結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
![]() |
提出日時 | 2015-10-05 23:19:21 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 542 bytes |
コンパイル時間 | 1,540 ms |
コンパイル使用メモリ | 159,972 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 01:13:31 |
合計ジャッジ時間 | 2,886 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 24 WA * 9 |
ソースコード
#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) int N; signed main() { cin >> N; vector<bool> C(N, true); string s; REP(i,N) REP(j,N) { cin >> s; if (i == j) continue; if (s != "nyanpass") { C[j] = false; } } int renchon = 0; REP(i,N) { if (!C[i]) continue; if (renchon == 0) { renchon = i + 1; } else { renchon = -1; } } cout << renchon << endl; return 0; }