結果
| 問題 |
No.1199 お菓子配り-2
|
| コンテスト | |
| ユーザー |
57tggx
|
| 提出日時 | 2020-08-23 11:35:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 165 ms / 1,000 ms |
| コード長 | 165 bytes |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 26,368 KB |
| 最終ジャッジ日時 | 2025-01-13 12:25:51 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 45 |
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<cstdio>
| ^~~~~~
main.cpp: In function ‘int main()’:
main.cpp:2:50: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=]
2 | long long n,m,i,j,x,y,a,t;int main(){for(scanf("%d%d",&n,&m);i<n;++i){for(a=x-y,j=0;j<m;++j)scanf("%lld",&t),a+=t;a<0?x-=a:y+=a;}printf("%lld\n",y);}
| ~^ ~~
| | |
| int* long long int*
| %lld
main.cpp:2:52: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=]
2 | long long n,m,i,j,x,y,a,t;int main(){for(scanf("%d%d",&n,&m);i<n;++i){for(a=x-y,j=0;j<m;++j)scanf("%lld",&t),a+=t;a<0?x-=a:y+=a;}printf("%lld\n",y);}
| ~^ ~~
| | |
| int* long long int*
| %lld
main.cpp:2:47: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
2 | long long n,m,i,j,x,y,a,t;int main(){for(scanf("%d%d",&n,&m);i<n;++i){for(a=x-y,j=0;j<m;++j)scanf("%lld",&t),a+=t;a<0?x-=a:y+=a;}printf("%lld\n",y);}
| ~~~~~^~~~~~~~~~~~~~
main.cpp:2:98: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
2 | long long n,m,i,j,x,y,a,t;int main(){for(scanf("%d%d",&n,&m);i<n;++i){for(a=x-y,j=0;j<m;++j)scanf("%lld",&t),a+=t;a<0?x-=a:y+=a;}printf("%lld\n",y);}
|
ソースコード
#import<cstdio>
long long n,m,i,j,x,y,a,t;int main(){for(scanf("%d%d",&n,&m);i<n;++i){for(a=x-y,j=0;j<m;++j)scanf("%lld",&t),a+=t;a<0?x-=a:y+=a;}printf("%lld\n",y);}
57tggx