/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 328.0 KiB
#2 Accepted 1ms 540.0 KiB
#3 Accepted 2ms 540.0 KiB
#4 Accepted 14ms 768.0 KiB
#5 Accepted 110ms 1.32 MiB
#6 Accepted 106ms 1.32 MiB
#7 Accepted 106ms 1.285 MiB
#8 Accepted 107ms 1.191 MiB
#9 Accepted 3ms 448.0 KiB
#10 Accepted 108ms 1.332 MiB

Code

#include<bits/stdc++.h>
#define ll                  long long
#define nl                  '\n'
#define F                   first
#define S                   second
#define all(a)              (a.begin()),(a.end())
#define UNIQUE(X)           (X).erase(unique(all(X)),(X).end())
#define SORT_UNIQUE(c)      (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define ms(a,b)             memset(a, b, sizeof(a))
#define Input               freopen("in.txt","r",stdin)
#define Output              freopen("out.txt","w",stdout)
#define MOD                 1000000007
using namespace std;


const int N = 2e5 + 5;

void Solve(int t)
{
	ll a, b, x;
	cin >> a >> b >> x;
	ll e = min(a, x);
	a -= e;
	x -= e;
	b -= min(b, x);
	cout << a << ' ' << b << endl;
}

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int t, T = 1;
	cin >> T;
	for (t = 1; t <= T; t++)
		Solve(t);
	return 0;
}

Information

Submit By
Type
Submission
Problem
P1187 Ticket Battle: Hridoy vs Kamona
Contest
Brain Booster #9
Language
C++17 (G++ 13.2.0)
Submit At
2025-04-06 15:31:51
Judged At
2025-04-06 15:31:51
Judged By
Score
100
Total Time
110ms
Peak Memory
1.332 MiB