結果
| 問題 | 
                            No.1813 Magical Stones
                             | 
                    
| コンテスト | |
| ユーザー | 
                             MasKoaTS
                         | 
                    
| 提出日時 | 2021-11-26 12:09:21 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 276 bytes | 
| コンパイル時間 | 454 ms | 
| コンパイル使用メモリ | 82,604 KB | 
| 実行使用メモリ | 79,252 KB | 
| 最終ジャッジ日時 | 2024-07-16 07:01:49 | 
| 合計ジャッジ時間 | 5,020 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 23 WA * 17 | 
ソースコード
#嘘解法( SCC を行わない)
import sys
input = sys.stdin.readline
N,M = map(int,input().split())
source = [True]*N
sink = [True]*N
for _ in [0]*M:
    a,b = map(int,input().split())
    source[a-1] = sink[b-1] = False
ans = max(sum(source),sum(sink))
print(ans)
            
            
            
        
            
MasKoaTS