/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 3ms 2.777 MiB
#2 Wrong Answer 3ms 2.777 MiB
#3 Wrong Answer 4ms 3.027 MiB

Code

#include <bits/stdc++.h>
using namespace std;
 
#define       ll           long long
#define       dub          double
#define       ull          unsigned long long
#define       CY           cout << "YES\n";
#define       CN           cout << "NO\n";
#define       pb           push_back
#define       eb           emplace_back
#define       ft           first
#define       sd           second
#define       srt(v)       sort(v.begin(), v.end())
#define       csrt(v)      sort(v.begin(), v.end(), cmp)
#define       rsrt(v)      sort(v.rbegin(), v.rend())
#define       pll          pair<ll, ll>
#define       vll          vector<pll>
#define       mod1         1000000000+7 // 10^9 + 7
const ll mod = 998244353;
const ll inf = 9000000000000000000;
 
bool cmp(const pair<string, pair<string, ll>> &a, const pair<string, pair<string, ll>> &b)
{
    if(a.sd.ft != b.sd.ft) return a.sd.ft < b.sd.ft;
    if(a.ft != b.ft) return a.ft < b.ft;
    return a.sd.sd > b.sd.sd;
}
 
const ll mx = 1e5+150;
vll adj[mx];
 
void solve(int cs)
{
    ll a, b, x;
    cin >> a >> b >> x;
    if(a >= x) a -= x, x = 0;
    else a = 0, x -= a;
    if(b >= x) b -= x;
    else b = 0;
    cout << a << " " << b << endl;
}
 
int main() {
 
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
 
        int tc=1, cnt=1;
        cin >> tc;
        while (tc--){
            solve(cnt);
            cnt++;
        }
 
 
 return 0;
}

Information

Submit By
Type
Submission
Problem
P1187 Ticket Battle: Hridoy vs Kamona
Language
C++17 (G++ 13.2.0)
Submit At
2025-06-13 07:37:26
Judged At
2025-06-13 07:37:26
Judged By
Score
10
Total Time
4ms
Peak Memory
3.027 MiB