# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
846301 |
2023-09-07T13:19:12 Z |
vjudge1 |
ČVENK (COI15_cvenk) |
C++ |
|
1 ms |
348 KB |
#include <bits/stdc++.h>
using namespace std;
#pragma optimize "DostSeferoğlu"
#pragma GCC optimize("unroll-loops,Ofast")
#pragma GCC target("avx2,tune=native")
#define int long long
#define pii pair<int,int>
#define bg begin
#define vi vector<int>
#define endl '\n'
#define vvi vector<vi>
#define vp vector<pii>
#define sp << " " <<
#define ff first
#define ss second
#define brake {cout << "OK\n";return;}
#define debug(x) {cout << #x << ": "; for (auto it : x) cout << it << " ";cout << endl;}
#define FF(xxx,sss,yyy) for (int xxx=sss;xxx<=yyy;++xxx)
#define F(xx,yy) for (int xx=1;xx<=yy;++xx)
#define pb push_back
const int inf = 1e18;
const int MOD = 998244353;
const int N = 3e5+1;
void solve() {
int n;
cin >> n;
auto lb = [&](int x) {return x&(-x);};
if (n == 2) {
int x,y;
int x2,y2;
cin >> x >> y >> x2 >> y2;
int fl = (x < y);
int fl2 = (x2 < y2);
if (fl && fl2) {
cout << x+x2+abs(y-y2) << endl;
}
else if (!fl && !fl2) {
cout << y+y2+abs(x-x2) << endl;
}
else cout << x+y+x2+y2 << endl;
}
}
signed main() {
ios_base::sync_with_stdio(0);cin.tie(0);
#ifdef Local
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t = 1;
//cin >> t;
while (t --> 0) solve();
}
Compilation message
cvenk.cpp:3: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
3 | #pragma optimize "DostSeferoğlu"
|
cvenk.cpp: In function 'void solve()':
cvenk.cpp:29:10: warning: variable 'lb' set but not used [-Wunused-but-set-variable]
29 | auto lb = [&](int x) {return x&(-x);};
| ^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |