結果
問題 | No.239 にゃんぱすー |
ユーザー |
|
提出日時 | 2024-10-26 11:51:41 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 539 bytes |
コンパイル時間 | 2,239 ms |
コンパイル使用メモリ | 96,524 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-26 11:51:46 |
合計ジャッジ時間 | 3,664 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 15 WA * 18 |
ソースコード
#include <iostream>#include <vector>#include <set>using namespace std;int main() {int n; cin >> n;vector<vector<string>> a(n,vector<string>(n,""));vector<int> arr(n,0);for(int i = 0; i < n; i++){for(int j = 0; j < n; j++){cin >> a[i][j];if(a[i][j] == "nyanpass") arr[j] += 1;}}int test = 0;for(int it:arr)if(it == 2)test++;if(test != 1){ cout << -1; return 0; }for(int i = 0; i < n; i++) {if(arr[i] == 2){cout << i + 1;return 0;}}return 0;}