QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#325944 | #5673. Cornhole | cry | AC ✓ | 0ms | 3972kb | C++20 | 1.9kb | 2024-02-12 05:04:11 | 2024-02-12 05:04:11 |
Judging History
answer
#pragma GCC optimize("O3,unroll-loops")
#include <bits/stdc++.h>
#ifndef LOCAL
#define debug(...) 0
#else
#include "C:\programmingfunnyxd\debug.cpp"
#endif
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
const int INF = 1e9;
const ll INFLL = 1e18;
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define FORE(i,a,b) for(int i = (a); i <= (b); ++i)
#define ROF(i,a,b) for(int i = (a); i >= (b); --i)
#define trav(a,x) for(auto& a: x)
#define sz(x) (int)x.size()
#define make_unique(v) sort(all(v)); v.erase(unique(all(v)), v.end())
template<class T> using minpq = priority_queue<T, vector<T>, greater<T>>;
template<class T> bool ckmin(T& a, const T& b){return b<a?a=b,1:0;}
template<class T> bool ckmax(T& a, const T& b){return a<b?a=b,1:0;}
template<int D, typename T>struct vt : public vector<vt<D - 1, T>> { template<typename... Args>
vt(int n = 0, Args... args) : vector<vt<D - 1, T>>(n, vt<D - 1, T>(args...)) {}};
template<typename T> struct vt<1, T> : public vector<T> {
vt(int n = 0, const T& val = T()) : vector<T>(n, val) {}};
template<typename T> istream& operator>>(istream& in, vector<T>& a) {for(auto &x : a) in >> x; return in;};
template<typename T> ostream& operator<<(ostream& out, vector<T>& a) {for(auto &x : a) out << x << ' '; return out;};
void solve() {
int ax, ay, bx, by; cin >> ax >> ay >> bx >> by;
int a_score = ax * 3 + ay, b_score = bx * 3 + by;
if(a_score > b_score){
printf("%d %d\n", 1, a_score - b_score);
}
else if(a_score == b_score){
puts("NO SCORE");
}
else{
printf("%d %d\n", 2, b_score - a_score);
}
}
signed main() {
cin.tie(0) -> sync_with_stdio(0);
int t = 1;
//cin >> t;
for(int test = 1; test <= t; test++){
solve();
}
}
/* /\_/\
* (= ._.)
* / > \>
*/
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3856kb
input:
2 1 0 4
output:
1 3
result:
ok single line: '1 3'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
1 1 0 4
output:
NO SCORE
result:
ok single line: 'NO SCORE'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
2 2 3 0
output:
2 1
result:
ok single line: '2 1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
0 0 0 0
output:
NO SCORE
result:
ok single line: 'NO SCORE'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
0 0 0 1
output:
2 1
result:
ok single line: '2 1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
0 1 0 1
output:
NO SCORE
result:
ok single line: 'NO SCORE'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
1 0 1 0
output:
NO SCORE
result:
ok single line: 'NO SCORE'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
1 1 1 0
output:
1 1
result:
ok single line: '1 1'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
1 1 1 1
output:
NO SCORE
result:
ok single line: 'NO SCORE'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
4 0 0 0
output:
1 12
result:
ok single line: '1 12'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3916kb
input:
4 0 0 4
output:
1 8
result:
ok single line: '1 8'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
3 0 0 3
output:
1 6
result:
ok single line: '1 6'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
0 4 4 0
output:
2 8
result:
ok single line: '2 8'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
3 1 1 3
output:
1 4
result:
ok single line: '1 4'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
0 4 2 1
output:
2 3
result:
ok single line: '2 3'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
2 2 2 0
output:
1 2
result:
ok single line: '1 2'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
2 0 2 2
output:
2 2
result:
ok single line: '2 2'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
4 0 3 1
output:
1 2
result:
ok single line: '1 2'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
2 0 1 2
output:
1 1
result:
ok single line: '1 1'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
1 2 2 0
output:
2 1
result:
ok single line: '2 1'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
2 2 3 1
output:
2 2
result:
ok single line: '2 2'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
3 0 2 2
output:
1 1
result:
ok single line: '1 1'