結果

問題 No.870 無敵囲い
コンテスト
ユーザー kuhaku
提出日時 2019-09-01 17:23:57
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 699 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 237 ms
コンパイル使用メモリ 38,976 KB
最終ジャッジ日時 2026-02-22 04:37:48
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

int main(void){
  int i, j;

  int n;
  scanf("%d", &n);

  int piece[3][2]={{2, 8}, {3, 9}, {7, 9}};
  int finish[3][2]={{5, 8}, {4, 8}, {6, 8}};

  int x_1, x_2, y_1, y_2;
  for(i=0; i<n; i++){
    scanf("%d%d%d%d", &x_1, &y_1, &x_2, &y_2);
    for(j=0; j<3; j++){
      if(piece[j][0] == x_1 && piece[j][1] == y_1){
        piece[j][0]=x_2;
        piece[j][1]=y_2;
      }
    }
  }

  for(i=0; i<n; i++){
    //printf("%d %d\n", piece[i][0], piece[i][1]);
  }

  int flag=0;
  for(i=0;i<3;i++){
    if(piece[i][0] != finish[i][0] || piece[i][1] != finish[i][1]){
      flag=1;
      break;
    }
  }

  if(flag == 0){
    printf("Yes\n");
  }else{
    printf("No\n");
  }
}
0