QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#267076 | #7755. Game on a Forest | manizare | Compile Error | / | / | C++14 | 869b | 2023-11-26 22:11:15 | 2023-11-26 22:11:15 |
Judging History
This is the latest submission verdict.
- [2023-11-26 22:11:15]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2023-11-26 22:11:15]
- Submitted
answer
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#define pb push_back
#define F first
#define S second
#define all(a) a.begin(),a.end()
#define pii pair <int,int>
#define PII pair<pii , pii>
#define int long long
#define ld long double
#define sz(v) (int)v.size()
using namespace std ;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn =1e5 + 10 , N = 3e5 + 10 , inf = 1e18 , mod = 1000000007 ;
signed main() {
ios::sync_with_stdio(0);cin.tie(0);
int n , m ; cin >> n >> m ;
for(int i = 1; i <= m ; i++){
int v ,u ;
cin >> v >> u ;
G[v].pb(u);G[u].pb(v);
}
if(n%2==1){
int ans =0 ;
for(int i =1 ; i <= n; i++){
if((m-sz(G[i]))%2==0)ans++;
}
cout << ans ;
}else{
if(m%2==1){
cout << m << "\n";
}else{
cout << 0 << "\n";
}
}
}
/*
*/
Details
answer.code: In function ‘int main()’: answer.code:23:17: error: ‘G’ was not declared in this scope 23 | G[v].pb(u);G[u].pb(v); | ^ answer.code:28:34: error: ‘G’ was not declared in this scope 28 | if((m-sz(G[i]))%2==0)ans++; | ^ answer.code:11:20: note: in definition of macro ‘sz’ 11 | #define sz(v) (int)v.size() | ^