結果
| 問題 | No.52 よくある文字列の問題 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-02-18 02:00:13 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 212 bytes |
| 記録 | |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 29,992 KB |
| 最終ジャッジ日時 | 2026-02-23 20:38:34 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 11 |
コンパイルメッセージ
main.c:1:23: warning: data definition has no type or storage class
1 | char s[9],a[1030][11];t,l,r,n;c(a,b){return strcmp(a,b);}main(i){n=strlen(gets(s));for(;t++<1<<n;l=0)for(i=r=n;i--;a[t][i]=s[t&1<<i?l++:--r]);qsort(a,t,11,c);for(;t--;i+=!!strcmp(a[t+1],a[t]));t=!printf("%d",i);}
| ^
main.c: In function ‘c’:
main.c:1:52: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
1 | char s[9],a[1030][11];t,l,r,n;c(a,b){return strcmp(a,b);}main(i){n=strlen(gets(s));for(;t++<1<<n;l=0)for(i=r=n;i--;a[t][i]=s[t&1<<i?l++:--r]);qsort(a,t,11,c);for(;t--;i+=!!strcmp(a[t+1],a[t]));t=!printf("%d",i);}
| ^
| |
| int
main.c:1:52: note: expected ‘const char *’ but argument is of type ‘int’
main.c:1:54: warning: passing argument 2 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
1 | char s[9],a[1030][11];t,l,r,n;c(a,b){return strcmp(a,b);}main(i){n=strlen(gets(s));for(;t++<1<<n;l=0)for(i=r=n;i--;a[t][i]=s[t&1<<i?l++:--r]);qsort(a,t,11,c);for(;t--;i+=!!strcmp(a[t+1],a[t]));t=!printf("%d",i);}
| ^
| |
| int
main.c:1:54: note: expected ‘const char *’ but argument is of type ‘int’
main.c: In function ‘main’:
main.c:1:68: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
1 | char s[9],a[1030][11];t,l,r,n;c(a,b){return strcmp(a,b);}main(i){n=strlen(gets(s));for(;t++<1<<n;l=0)for(i=r=n;i--;a[t][i]=s[t&1<<i?l++:--r]);qsort(a,t,11,c);for(;t--;i+=!!strcmp(a[t+1],a[t]));t=!printf("%d",i);}
|
ソースコード
char s[9],a[1030][11];t,l,r,n;c(a,b){return strcmp(a,b);}main(i){n=strlen(gets(s));for(;t++<1<<n;l=0)for(i=r=n;i--;a[t][i]=s[t&1<<i?l++:--r]);qsort(a,t,11,c);for(;t--;i+=!!strcmp(a[t+1],a[t]));t=!printf("%d",i);}
testestest