Submission #69107876


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;//vvi vec(h, vi(w, n));
using vll = vector<ll>;
using vvll = vector<vll>;
using vc = vector<char>;
using vs = vector<string>;
using vvc = vector<vc>;
#define rep(i, a, n) for(ll i=(a); i<(ll)(n); ++i)
#define el '\n'
#define Yes cout << "Yes" << el
#define No cout << "No" << el
#define YES cout << "YES" << el
#define NO cout << "NO" << el
//cout << fixed << setprecision(10);

// abc422

int main(){
  ll t; cin >> t;
  rep(testcase,0,t){
    ll na, nb, nc; cin >> na >> nb >> nc;
    ll sum=na+nb+nc;
    ll max=sum/3;
    ll ans=min({max,na,nc});
    cout << ans << el;
  }
}

Submission Info

Submission Time
Task C - AtCoder AAC Contest
User demado
Language C++ 23 (gcc 12.2)
Score 300
Code Size 723 Byte
Status AC
Exec Time 335 ms
Memory 3648 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 1
AC × 14
Set Name Test Cases
Sample 00_sample_00.txt
All 00_sample_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3460 KiB
01_random_01.txt AC 330 ms 3648 KiB
01_random_02.txt AC 331 ms 3392 KiB
01_random_03.txt AC 332 ms 3452 KiB
01_random_04.txt AC 331 ms 3492 KiB
01_random_05.txt AC 335 ms 3464 KiB
01_random_06.txt AC 331 ms 3500 KiB
01_random_07.txt AC 331 ms 3500 KiB
01_random_08.txt AC 329 ms 3456 KiB
01_random_09.txt AC 331 ms 3492 KiB
01_random_10.txt AC 330 ms 3456 KiB
01_random_11.txt AC 331 ms 3460 KiB
01_random_12.txt AC 330 ms 3472 KiB
01_random_13.txt AC 256 ms 3508 KiB