結果
| 問題 | No.999 てん vs. ほむ |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2020-10-22 15:09:24 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 126 bytes |
| 記録 | |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 25,344 KB |
| 最終ジャッジ日時 | 2026-02-22 06:14:16 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(n,x,y){
| ^~~~
main.c: In function 'main':
main.c:1:1: warning: old-style function definition [-Wold-style-definition]
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'x' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'y' defaults to 'int' [-Wimplicit-int]
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d",&n);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main(n,x,y){
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d",&n);
| ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
8 | printf("%ld",b*2-a);
| ^~~~~~
main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:9: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
main(n,x,y){
long a=0,b=0;
scanf("%d",&n);
while(~scanf("%d%d",&x,&y)){
a+=x-y;
if(b<a) b=a;
}
printf("%ld",b*2-a);
}
tails