QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#112171#5673. CornholePetroTarnavskyi#AC ✓2ms3516kbC++14825b2023-06-10 14:37:562023-06-10 14:37:59

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-10 14:37:59]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3516kb
  • [2023-06-10 14:37:56]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VL = vector<LL>;
using PII = pair<int, int>;
using PLL = pair<LL, LL>;

#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define F first
#define S second
#define FOR(i, a, b) for (int i = (a); i<(b); ++i)
#define RFOR(i, b, a) for (int i = (b)-1; i>=(a); --i)
#define FILL(a, b) memset(a, b, sizeof(a))

int read(){
	int h, b;
	cin >> h >> b;
	return 3 * h + b;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int a = read();
	int b = read();
	if(a == b)
		cout << "NO SCORE" << endl;
	else{
		cout << 1 + (b > a) << " " << abs(a - b) << endl;
	}

	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 1
0 4

output:

1 3

result:

ok single line: '1 3'

Test #2:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

1 1
0 4

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #3:

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

input:

2 2
3 0

output:

2 1

result:

ok single line: '2 1'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3512kb

input:

0 0
0 0

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3396kb

input:

0 0
0 1

output:

2 1

result:

ok single line: '2 1'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3388kb

input:

0 1
0 1

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #7:

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

input:

1 0
1 0

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #8:

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

input:

1 1
1 0

output:

1 1

result:

ok single line: '1 1'

Test #9:

score: 0
Accepted
time: 2ms
memory: 3396kb

input:

1 1
1 1

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #10:

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

input:

4 0
0 0

output:

1 12

result:

ok single line: '1 12'

Test #11:

score: 0
Accepted
time: 2ms
memory: 3512kb

input:

4 0
0 4

output:

1 8

result:

ok single line: '1 8'

Test #12:

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

input:

3 0
0 3

output:

1 6

result:

ok single line: '1 6'

Test #13:

score: 0
Accepted
time: 2ms
memory: 3468kb

input:

0 4
4 0

output:

2 8

result:

ok single line: '2 8'

Test #14:

score: 0
Accepted
time: 2ms
memory: 3512kb

input:

3 1
1 3

output:

1 4

result:

ok single line: '1 4'

Test #15:

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

input:

0 4
2 1

output:

2 3

result:

ok single line: '2 3'

Test #16:

score: 0
Accepted
time: 2ms
memory: 3404kb

input:

2 2
2 0

output:

1 2

result:

ok single line: '1 2'

Test #17:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

2 0
2 2

output:

2 2

result:

ok single line: '2 2'

Test #18:

score: 0
Accepted
time: 2ms
memory: 3468kb

input:

4 0
3 1

output:

1 2

result:

ok single line: '1 2'

Test #19:

score: 0
Accepted
time: 2ms
memory: 3404kb

input:

2 0
1 2

output:

1 1

result:

ok single line: '1 1'

Test #20:

score: 0
Accepted
time: 2ms
memory: 3400kb

input:

1 2
2 0

output:

2 1

result:

ok single line: '2 1'

Test #21:

score: 0
Accepted
time: 2ms
memory: 3400kb

input:

2 2
3 1

output:

2 2

result:

ok single line: '2 2'

Test #22:

score: 0
Accepted
time: 2ms
memory: 3368kb

input:

3 0
2 2

output:

1 1

result:

ok single line: '1 1'