結果
| 問題 | No.345 最小チワワ問題 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-02-26 22:53:44 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 165 bytes |
| 記録 | |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 28,996 KB |
| 最終ジャッジ日時 | 2026-02-23 20:48:12 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 15 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | i,j,m,t;
| ^
main.c: In function ‘main’:
main.c:6:4: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
6 | i=!printf("%d",m-1);
| ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | char s[110];
/usr/bin/ld: /tmp/ccmgDEqC.o: in function `main':
main.c:(.text.startup+0x12): 警告: the `gets' function is dangerous and should not be used.
ソースコード
char s[110];
i,j,m,t;
main(){
gets(s);
for(i=0;s[i];t==2?!m?m=j-i+2:m<j-i+2?m=j-i+2:0:0,i++)for(t=0,j=i;s[i]=='c'&&t!=2&&s[++j];t+=s[j]=='w');
i=!printf("%d",m-1);
}
testestest