QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#714698#5673. Cornholezeyu#AC ✓1ms3708kbC++231.9kb2024-11-06 02:56:322024-11-06 02:56:32

Judging History

你现在查看的是最新测评结果

  • [2024-11-06 02:56:32]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3708kb
  • [2024-11-06 02:56:32]
  • 提交

answer

#include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define pl pair<ll, ll>
#define pi pair<int, int>
#define minpq priority_queue<ll, vector<ll>, greater<ll>>
using namespace std;

#if 1
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '['; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "]";}
void _print() {cerr << endl << flush;}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#define debug(x...) cerr << "*["<<__LINE__<<"]\t"<< #x << " = "; _print(x)
#endif

const ll mod = 1e9 + 7;

template<typename T> bool chkmin(T &a, T b){return (b < a) ? a = b, 1 : 0;}
template<typename T> bool chkmax(T &a, T b){return (b > a) ? a = b, 1 : 0;}
ll gcd(ll a, ll b) {if(b == 0){return a;} return gcd(b, a % b);}
 
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int h1, b1, h2, b2;
	cin >> h1 >> b1 >> h2 >> b2;
	int s1 = h1 * 3 + b1;
	int s2 = h2 * 3 + b2;
	if (s1 > s2){
		cout << "1 " << s1 - s2 << '\n';
	} else if (s1 < s2){
		cout << "2 " << s2 - s1 << '\n';
	} else{
		cout << "NO SCORE";
	}
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3576kb

input:

2 1
0 4

output:

1 3

result:

ok single line: '1 3'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

1 1
0 4

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:

2 2
3 0

output:

2 1

result:

ok single line: '2 1'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

0 0
0 0

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3680kb

input:

0 0
0 1

output:

2 1

result:

ok single line: '2 1'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

0 1
0 1

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #7:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

1 0
1 0

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #8:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

1 1
1 0

output:

1 1

result:

ok single line: '1 1'

Test #9:

score: 0
Accepted
time: 1ms
memory: 3704kb

input:

1 1
1 1

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3704kb

input:

4 0
0 0

output:

1 12

result:

ok single line: '1 12'

Test #11:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

4 0
0 4

output:

1 8

result:

ok single line: '1 8'

Test #12:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

3 0
0 3

output:

1 6

result:

ok single line: '1 6'

Test #13:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

0 4
4 0

output:

2 8

result:

ok single line: '2 8'

Test #14:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

3 1
1 3

output:

1 4

result:

ok single line: '1 4'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

0 4
2 1

output:

2 3

result:

ok single line: '2 3'

Test #16:

score: 0
Accepted
time: 1ms
memory: 3572kb

input:

2 2
2 0

output:

1 2

result:

ok single line: '1 2'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

2 0
2 2

output:

2 2

result:

ok single line: '2 2'

Test #18:

score: 0
Accepted
time: 1ms
memory: 3708kb

input:

4 0
3 1

output:

1 2

result:

ok single line: '1 2'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

2 0
1 2

output:

1 1

result:

ok single line: '1 1'

Test #20:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

1 2
2 0

output:

2 1

result:

ok single line: '2 1'

Test #21:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

2 2
3 1

output:

2 2

result:

ok single line: '2 2'

Test #22:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

3 0
2 2

output:

1 1

result:

ok single line: '1 1'