結果
問題 |
No.239 にゃんぱすー
|
ユーザー |
|
提出日時 | 2019-07-23 20:56:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 1,813 ms |
コンパイル使用メモリ | 167,968 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 08:45:02 |
合計ジャッジ時間 | 2,926 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; string s; cin >> n; int a[n] = {}; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> s; if (s != "-" && s != "nyanpass") a[j] = 1; } } for (int i = 0; i < n; i++) { if (a[i] == 0) { if (ans == 0) ans = i + 1; else ans = -1; } } if (ans == 0) ans = -1; cout << ans << endl; return 0; }