Submission #873632

#TimeUsernameProblemLanguageResultExecution timeMemory
873632vjudge1Ronald (COCI17_ronald)C++17
0 / 120
3 ms604 KiB
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #define tof_io ios_base::sync_with_stdio(false);cin.tie(0) , cout.tie(0); #define double long double #define int long long #define pb push_back #define all(x) x.begin(),x.end() #define endl '\n' #define sz(x) x.size() //const int mod = 998244353; //998244353 1e9+7 1e9+9 const int N = 5e3 + 23; const int lg = 23; const int inf = 2e18; int fac[N]; int inv[N]; double cnt1 = 0.0; //int dnt_pow (int a, int b, int md = mod){int ans = 1; while(b){if(b&1){ans = (a*ans)%md;}a = (a*a)%md;b >>= 1;}return ans ;} //void dnt_bld (){fac[0] = 1; inv[0] = dnt_pow(fac[0],mod-2) ;for(int i = 1 ; i < N ; i++) {fac[i] = (fac[i-1] * i) % mod;inv[i] = dnt_pow( fac[i] , mod-2);}} //int dnt_ncr (int r,int n){if(r>n) return 0; return fac[n] * inv[r] % mod * inv[n-r] % mod;} int32_t main() { int n; cin >> n; int m; cin >> m; vector<vector<int>> vc(n); for (int i = 0; i < n; i++) { vc[i].assign(n, 1); vc[i][i] = 0; } while (m--) { int u, v; cin >> u >> v; vc[u-1][v-1] = 0; vc[v-1][u-1] = 0; } // bool fl1 = 1; bool fl2 = 1; int val[vc.size()]; for (int i = 0; i < vc.size(); i++) { val[i] = vc[0][i] ^ 0; } for (int i = 0; i < vc.size(); i++) { for (int j = 0; j < vc.size(); j++) { if (vc[i][j] != (val[i] ^ val[j])) { fl1 = 0; } } } val[vc.size()]; for (int i = 0; i <vc.size(); i++) { val[i] = vc[0][i] ^ 1; } for (int i = 0; i < vc.size(); i++) { for (int j = 0; j < vc.size(); j++) { if (vc[i][j] != (val[i] ^ val[j])) { fl2 = 0; } } } // if(fl1 or fl2) cout <<"NE"; else cout <<"DA"; }

Compilation message (stderr)

ronald.cpp: In function 'int32_t main()':
ronald.cpp:47:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   47 |     for (int i = 0; i < vc.size(); i++)
      |                     ~~^~~~~~~~~~~
ronald.cpp:51:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   51 |     for (int i = 0; i < vc.size(); i++)
      |                     ~~^~~~~~~~~~~
ronald.cpp:53:27: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   53 |         for (int j = 0; j < vc.size(); j++)
      |                         ~~^~~~~~~~~~~
ronald.cpp:62:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   62 |     for (int i = 0; i <vc.size(); i++)
      |                     ~~^~~~~~~~~~
ronald.cpp:66:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   66 |     for (int i = 0; i < vc.size(); i++)
      |                     ~~^~~~~~~~~~~
ronald.cpp:68:27: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 |         for (int j = 0; j < vc.size(); j++)
      |                         ~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...