제출 #252509

#제출 시각아이디문제언어결과실행 시간메모리
252509BlagojceTug of War (BOI15_tug)C++11
0 / 100
3 ms512 KiB
#include <bits/stdc++.h> #define fr(i, n, m) for(int i = (n); i < (m); i ++) #define pb push_back #define st first #define nd second #define pq priority_queue #define all(x) begin(x), end(x) #include <time.h> #include <cmath> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; const int i_inf = 1e9; const ll inf = 1e18; const ll mod = 1000000007; const ld eps = 1e-13; const ld pi = 3.14159265359; mt19937 _rand(time(NULL)); clock_t timer = clock(); const int mxn = 5e5; int l[mxn], r[mxn], s[mxn]; int n; void subtask3(){ int deg[2*n]; memset(deg, 0, sizeof(deg)); fr(i, 0, n){ deg[l[i]]++; deg[r[i]+n]++; } fr(i, 0, 2*n){ if(deg[i] % 2){ cout<<"NO"<<endl; return; } } cout<<"YES"<<endl; } void solve(){ cin >> n; bool sub3 = true; fr(i, 0, n){ cin >> l[i] >> r[i] >> s[i]; --l[i], --r[i]; if(s[i] != 1) sub3 = false; } subtask3(); } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); solve(); }

컴파일 시 표준 에러 (stderr) 메시지

tug.cpp: In function 'void solve()':
tug.cpp:47:7: warning: variable 'sub3' set but not used [-Wunused-but-set-variable]
  bool sub3 = true;
       ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...