제출 #1031119

#제출 시각아이디문제언어결과실행 시간메모리
1031119AbitoTiles (BOI24_tiles)C++17
4 / 100
40 ms5716 KiB
#include <bits/stdc++.h> #define F first #define S second #define pb push_back #define ppb pop_back #define ep insert #define endl '\n' #define elif else if #define pow pwr #define sqrt sqrtt //#define int long long #define ll long long #define y1 YONE typedef unsigned long long ull; using namespace std; const int N=2e5+5; int n,x[N],y[N],m; int32_t main(){ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); cin>>n>>m; for (int i=1;i<=n;i++) cin>>x[i]>>y[i]; sort(x+1,x+1+n); sort(y+1,y+1+n); if (y[1]==y[n]){ cout<<m<<endl; return 0; } if ((y[n]-y[1])&1){ cout<<x[1]<<endl; return 0; } cout<<x[n]-bool((x[n]-x[1])&1)<<endl; return 0; }
#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...