답안 #137113

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
137113 2019-07-27T05:35:50 Z KLPP Ronald (COCI17_ronald) C++14
120 / 120
194 ms 6392 KB
#include<bits/stdc++.h>

using namespace std;
typedef long long int lld;
#define rep(i,a,b) for(int i=a;i<b;i++)

int main(){
  int n,m;
  cin>>n>>m;
  int table[n][n];
  rep(i,0,n){
    rep(j,0,n)table[i][j]=0;
  }
  rep(i,0,m){
    int x,y;
    cin>>x>>y;
    x--;y--;
    table[x][y]=1;
    table[y][x]=1;
  }
  int arr[n];
  arr[0]=0;
  rep(i,1,n){
    arr[i]=1-table[0][i];
  }
  rep(i,0,n){
    rep(j,i+1,n){
      if((arr[i]+arr[j]+table[i][j])%2==0){
	cout<<"NE"<<endl;
	return 0;
      }
    }
  }
  cout<<"DA"<<endl;
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 252 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 364 KB Output is correct
2 Correct 3 ms 376 KB Output is correct
3 Correct 4 ms 376 KB Output is correct
4 Correct 4 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 496 KB Output is correct
2 Correct 48 ms 1784 KB Output is correct
3 Correct 19 ms 804 KB Output is correct
4 Correct 13 ms 760 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 504 KB Output is correct
2 Correct 33 ms 1656 KB Output is correct
3 Correct 132 ms 5564 KB Output is correct
4 Correct 194 ms 6392 KB Output is correct