結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2015-04-30 01:37:39 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 857 bytes |
コンパイル時間 | 1,393 ms |
コンパイル使用メモリ | 159,680 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 09:01:43 |
合計ジャッジ時間 | 2,483 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 37 WA * 6 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> pii; typedef long long ll; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) int main(){ // char Sbefore[3]; // char Safter[3]; string Sbefore; string Safter; int N=0; cin >> Sbefore ; cin >> N; cin >> Safter ; int fail_count=0; for(int i=0;i<3;i++){ if(Sbefore[i] != Safter[i]){ fail_count ++; } } if(count(Sbefore.begin(),Sbefore.end(),'o') != count(Safter.begin(),Safter.end(),'o')){ printf("SUCCESS\n"); }else if((N == 0 and fail_count > 0) or (N == 1 and Sbefore[0] != Safter[0] and Sbefore[2] != Safter[2]) or (N == 1 and Sbefore[1] != Safter[1])){ printf("SUCCESS\n"); }else{ printf("FAILURE\n"); } return 0; }