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