結果
問題 |
No.385 カップ麺生活
|
ユーザー |
👑 ![]() |
提出日時 | 2016-07-02 00:36:07 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 16 ms / 2,000 ms |
コード長 | 207 bytes |
コンパイル時間 | 698 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-04 22:31:19 |
合計ジャッジ時間 | 1,322 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j<m&&m%j?:(s+=!q[m]|m-j?0:~q[m],j=1,--m););x=!printf("%d",s);} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘q’ [-Wimplicit-int] main.c:1:10: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int] 1 | q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j<m&&m%j?:(s+=!q[m]|m-j?0:~q[m],j=1,--m););x=!printf("%d",s);} | ^ main.c:1:12: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] 1 | q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j<m&&m%j?:(s+=!q[m]|m-j?0:~q[m],j=1,--m););x=!printf("%d",s);} | ^ main.c:1:18: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j<m&&m%j?:(s+=!q[m]|m-j?0:~q[m],j=1,--m););x=!printf("%d",s);} | ^ main.c:1:21: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] 1 | q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j<m&&m%j?:(s+=!q[m]|m-j?0:~q[m],j=1,--m););x=!printf("%d",s);} | ^ main.c:1:23: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j<m&&m%j?:(s+=!q[m]|m-j?0:~q[m],j=1,--m););x=!printf("%d",s);}
ソースコード
q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j<m&&m%j?:(s+=!q[m]|m-j?0:~q[m],j=1,--m););x=!printf("%d",s);}