Submission #00180
ソースコード
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 | #include<bits/stdc++.h> using namespace std; int main(){ string s[5000]; int i=0; while (cin>>s[i]){ i++; } if (s[i-1]== "not" ){ for ( int j=0;j<i-1;j++){ cout<<s[j]<< ' ' ; } cout<<s[i-1]<<endl; } else { for ( int j=i-2;j>=0;j--){ if (s[j]== "not" && s[j-1]== "not" ){ s[j]= "1" ; s[j-1]= "1" ; } } if (s[0]== "1" ){ cout<<s[i-1]<<endl; } else if (s[0]== "not" ){ cout<< "not" << ' ' <<s[i-1]<<endl; } } } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - 二重否定除去法則 |
ユーザー名 | 狐↑虎↓ |
投稿日時 | 2015-08-28 11:55:57 |
言語 | C++11 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 489 Byte |
最大実行時間 | 25 ms |
最大メモリ使用量 | 812 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 20 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
scrambled_00.txt | AC | 21 ms | 604 KB |
1
|
scrambled_01.txt | AC | 20 ms | 808 KB |
1
|
scrambled_02.txt | AC | 14 ms | 764 KB |
1
|
scrambled_03.txt | AC | 16 ms | 712 KB |
1
|
scrambled_04.txt | AC | 13 ms | 668 KB |
1
|
scrambled_05.txt | AC | 16 ms | 748 KB |
1
|
scrambled_06.txt | AC | 22 ms | 704 KB |
1
|
scrambled_07.txt | AC | 20 ms | 788 KB |
1
|
scrambled_08.txt | AC | 15 ms | 744 KB |
1
|
scrambled_09.txt | WA | 23 ms | 700 KB |
1
|
scrambled_10.txt | WA | 20 ms | 652 KB |
1
|
scrambled_11.txt | WA | 17 ms | 724 KB |
1
|
scrambled_12.txt | WA | 22 ms | 796 KB |
1
|
scrambled_13.txt | WA | 17 ms | 616 KB |
1
|
scrambled_14.txt | WA | 15 ms | 700 KB |
1
|
scrambled_15.txt | WA | 18 ms | 652 KB |
1
|
scrambled_16.txt | WA | 20 ms | 728 KB |
1
|
scrambled_17.txt | WA | 14 ms | 812 KB |
1
|
scrambled_18.txt | WA | 25 ms | 760 KB |
1
|