QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#723903#5673. CornholeBackToSquare1AC ✓1ms3712kbC++201.1kb2024-11-08 02:57:392024-11-08 02:57:39

Judging History

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

  • [2024-11-08 02:57:39]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3712kb
  • [2024-11-08 02:57:39]
  • 提交

answer

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp> 
// #include <ext/pb_ds/tree_policy.hpp>
 
using namespace std;
// using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
 
typedef pair<ll, ll> pl;
typedef pair<ld,ld> pd;
typedef vector<ll> vl;
// typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
 
 
#define G(x) ll x; cin >> x;
#define F(i, l, r) for (ll i = l; i < (r); ++i)
#define all(a) begin(a), end(a)
#define K first
#define V second
#define OK(i,j) i >= 0 && i < n && j >= 0 && j < m
 
#define NN 2505
#define MM 5005
#define MOD 1000007

void solve() {

    ll h1, b1, h2, b2;
    cin >> h1 >> b1 >> h2 >> b2;
    ll score1 = 3*h1 + b1;
    ll score2 = 3*h2 + b2;
    if(score1 > score2) {
        cout << 1 << ' ' << score1-score2 << '\n';
    }
    else if(score2 > score1) {
        cout << 2 << ' ' << score2 - score1 << '\n';
    }
    else cout << "NO SCORE\n";

}

int main() {
    cin.tie(0)->sync_with_stdio(0);
    cout << fixed << setprecision(10);

    solve();

    return 0;

}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3668kb

input:

2 1
0 4

output:

1 3

result:

ok single line: '1 3'

Test #2:

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

input:

1 1
0 4

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #3:

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

input:

2 2
3 0

output:

2 1

result:

ok single line: '2 1'

Test #4:

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

input:

0 0
0 0

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #5:

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

input:

0 0
0 1

output:

2 1

result:

ok single line: '2 1'

Test #6:

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

input:

0 1
0 1

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #7:

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

input:

1 0
1 0

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #8:

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

input:

1 1
1 0

output:

1 1

result:

ok single line: '1 1'

Test #9:

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

input:

1 1
1 1

output:

NO SCORE

result:

ok single line: 'NO SCORE'

Test #10:

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

input:

4 0
0 0

output:

1 12

result:

ok single line: '1 12'

Test #11:

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

input:

4 0
0 4

output:

1 8

result:

ok single line: '1 8'

Test #12:

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

input:

3 0
0 3

output:

1 6

result:

ok single line: '1 6'

Test #13:

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

input:

0 4
4 0

output:

2 8

result:

ok single line: '2 8'

Test #14:

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

input:

3 1
1 3

output:

1 4

result:

ok single line: '1 4'

Test #15:

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

input:

0 4
2 1

output:

2 3

result:

ok single line: '2 3'

Test #16:

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

input:

2 2
2 0

output:

1 2

result:

ok single line: '1 2'

Test #17:

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

input:

2 0
2 2

output:

2 2

result:

ok single line: '2 2'

Test #18:

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

input:

4 0
3 1

output:

1 2

result:

ok single line: '1 2'

Test #19:

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

input:

2 0
1 2

output:

1 1

result:

ok single line: '1 1'

Test #20:

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

input:

1 2
2 0

output:

2 1

result:

ok single line: '2 1'

Test #21:

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

input:

2 2
3 1

output:

2 2

result:

ok single line: '2 2'

Test #22:

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

input:

3 0
2 2

output:

1 1

result:

ok single line: '1 1'