Submission #4040021


Source Code Expand

#include <bits/stdc++.h>
typedef unsigned long long ull;
typedef long long ll;
#define __TRUE "Yes"
#define __FALSE "No"
#define cout(x) cout << (x) << endl
#define MAX 100001
using namespace std;

int main() {
  int c[3][3];
  for(int h=0;h<3;h++) {
    for(int w=0;w<3;w++) {
      cin >> c[h][w];
    }
  }
  int a,b[3];
  for(int a=0;a<=c[0][0];a++) {
    bool flag=true;
    b[0]=c[0][0]-a;
    b[1]=c[0][1]-a;
    b[2]=c[0][2]-a;

    if( !( (c[1][0]-b[0]==c[1][1]-b[1])&&(c[1][1]-b[1]==c[1][2]-b[2]) ) ) flag=false;
    if( !( (c[2][0]-b[0]==c[2][1]-b[1])&&(c[2][1]-b[1]==c[2][2]-b[2]) ) ) flag=false;

    if(flag) {
      cout << __TRUE << endl;
      return 0;
    }
  }
  cout << __FALSE << endl;
}

Submission Info

Submission Time
Task C - Takahashi's Information
User yapatta
Language C++14 (GCC 5.4.1)
Score 300
Code Size 741 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 24
Set Name Test Cases
Sample sample_1.txt, sample_2.txt, sample_3.txt, sample_4.txt
All in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, in18.txt, in19.txt, in20.txt, sample_1.txt, sample_2.txt, sample_3.txt, sample_4.txt
Case Name Status Exec Time Memory
in01.txt AC 1 ms 256 KB
in02.txt AC 1 ms 256 KB
in03.txt AC 1 ms 256 KB
in04.txt AC 1 ms 256 KB
in05.txt AC 1 ms 256 KB
in06.txt AC 1 ms 256 KB
in07.txt AC 1 ms 256 KB
in08.txt AC 1 ms 256 KB
in09.txt AC 1 ms 256 KB
in10.txt AC 1 ms 256 KB
in11.txt AC 1 ms 256 KB
in12.txt AC 1 ms 256 KB
in13.txt AC 1 ms 256 KB
in14.txt AC 1 ms 256 KB
in15.txt AC 1 ms 256 KB
in16.txt AC 1 ms 256 KB
in17.txt AC 1 ms 256 KB
in18.txt AC 1 ms 256 KB
in19.txt AC 1 ms 256 KB
in20.txt AC 1 ms 256 KB
sample_1.txt AC 1 ms 256 KB
sample_2.txt AC 1 ms 256 KB
sample_3.txt AC 1 ms 256 KB
sample_4.txt AC 1 ms 256 KB