結果
| 問題 |
No.483 マッチ並べ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-11 00:09:19 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 307 bytes |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 21,376 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-29 11:25:14 |
| 合計ジャッジ時間 | 1,925 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 50 WA * 3 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:6:33: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | for(i = 1;i <= 2*n;i++){scanf("%d%d",&x,&y);zh[x][y]++;}
| ^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void){
int zh[128][128]={0},n,c=0,x,y,i;
scanf("%d",&n);
for(i = 1;i <= 2*n;i++){scanf("%d%d",&x,&y);zh[x][y]++;}
for(x = 1;x <= 100;x++){
for(y = 1;y <= 100;y++){
if(zh[x][y] >= 2){c+=(zh[x][y]-1);}
}
}
if(n >= c){printf("YES\n");}else{printf("NO\n");}
return 0;
}