結果
| 問題 | No.239 にゃんぱすー |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-30 00:09:52 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 17 ms / 2,000 ms |
| + 661µs | |
| コード長 | 485 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-11-06 00:45:24 |
| 合計ジャッジ時間 | 3,102 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge7_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 35 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
n = int(readline())
a = [readline().rstrip().decode().split() for _ in range(n)]
ans = -1
for i in range(n):
for j in range(n):
if i == j:
continue
if a[j][i] != 'nyanpass':
break
else:
if ans != -1:
print(-1)
break
ans = i + 1
else:
print(ans)