Submission #00088
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #include<bits/stdc++.h> #include<string.h> using namespace std; int main(){ int n; while (1){ cin >>n; if (n==0) break ; string w[42]; for ( int i=0;i<n;i++){ cin >>w[i]; } string save= "" ; int ans=0; for ( int i=0;i<n;i++){ save = w[i]; int flag5=0; int flag7=0; int flag5_2=0; int flag7_2=0; int flag7_3=0; for ( int j=i+1;j<n;j++){ save += w[j]; // cout <<save<<endl; if (save.size() == 5){ // cout <<save.size()<<endl; save = "" ; flag5++; } else if (save.size() == 7 && flag5!=0){ cout <<save.size()<<endl; save = "" ; flag7++; } else if (save.size() == 5 && flag7!=0){ // cout <<save.size()<<endl; save = "" ; flag5_2++; } else if (save.size() == 7 && flag5_2!=0){ // cout <<save.size()<<endl; save = "" ; flag7_2++; } else if (save.size() == 7 && flag7_2!=0){ // cout <<save.size()<<endl; save = "" ; flag7_3++; } else if (flag7_3 != 0){ ans = i; cout << ans <<endl; break ; } } } } } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - 短句 |
ユーザー名 | ei1528 |
投稿日時 | 2016-03-30 15:01:20 |
言語 | C++ |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 1126 Byte |
最大実行時間 | 19 ms |
最大メモリ使用量 | 708 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 15 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
B1 | WA | 19 ms | 476 KB |
1
|
B2 | WA | 11 ms | 708 KB |
1
|
B3 | WA | 12 ms | 556 KB |
1
|
B4 | WA | 13 ms | 404 KB |
1
|