結果

問題 No.483 マッチ並べ
ユーザー mono1977
提出日時 2017-02-10 22:56:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 514 ms
コンパイル使用メモリ 38,124 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-29 08:12:35
合計ジャッジ時間 1,862 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>

int main(){
	int table[100][100]={0};//[r][c]
	int n;
	scanf("%d",&n);
	int i;
	int r,c;
	
	int canPutMatches=1;
	for(i=0;i<2*n;i++){
		scanf("%d %d",&r,&c);
		table[r-1][c-1]++;
		if(table[r-1][c-1]>=3){
			canPutMatches=0;
			break;
		}
	}
	
	if(canPutMatches){
		puts("YES");
	}else{
		puts("NO");
	}
	
    return 0;
}
0