結果
| 問題 | No.178 美しいWhitespace (1) |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-11-08 20:43:40 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 139 bytes |
| 記録 | |
| コンパイル時間 | 95 ms |
| コンパイル使用メモリ | 19,968 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 14:11:07 |
| 合計ジャッジ時間 | 983 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 6 WA * 15 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
| ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int]
main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int]
1 | p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
| ^
main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
1 | p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
| ^
main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
1 | p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
| ^
main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
1 | p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
| ^
main.c:1:16: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
| ^~~~
main.c: In function ‘main’:
main.c:1:33: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
1 | p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
| ^~~~
main.c:1:43: warning: implicit declaration of function ‘scanf’ [-Wimplicit-func
ソースコード
p,m,a[999],s,x;main(long n){for(gets(&p);~scanf("%d%d",&x,&p);m=x>m?x:m)a[s++]=x+=p*4;for(;s&&n%2;n+=m-a[--s]);s=!printf("%ld",n%2*n/2-1);}
testestest