結果
| 問題 |
No.239 にゃんぱすー
|
| コンテスト | |
| ユーザー |
cww
|
| 提出日時 | 2016-05-18 13:12:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 515 bytes |
| コンパイル時間 | 1,726 ms |
| コンパイル使用メモリ | 172,900 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-06 05:29:17 |
| 合計ジャッジ時間 | 3,048 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 25 WA * 8 |
ソースコード
#include <bits/stdc++.h>
#define REP(i, n) for(int i=0; i<(n); i++)
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
string s;
set<int> st;
REP( i, n ){
REP( j, n ){
cin >> s;
bool flag = false;
if( s == "nyanpass" ){
st.insert( j );
flag = true;
}else{
if( flag ){
st.erase( j );
}
}
}
}
for( auto x : st ){
if( st.size() == 1 ){
cout << x + 1 << endl;
return 0;
}
}
cout << -1 << endl;
return 0;
}
cww