Submission #69101635
Source Code Expand
#include <string> #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; using lint = long long int; using P = pair<int, int>; using PL = pair<lint, lint>; #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++) #define IFOR(i, begin, end) for(int i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--) #define REP(i, n) FOR(i,0,n) #define IREP(i, n) IFOR(i,0,n) #define ALL(a) (a).begin(),(a).end() constexpr int MOD = 1000000007; vector<lint> RH_B = {1532834020, 1388622299}; vector<lint> RH_M = {2147482409, 2147478017}; constexpr int INF = 2147483647; void yes(bool expr) {cout << (expr ? "Yes" : "No") << "\n";} template<class T>void chmax(T &a, const T &b) { if (a<b) a=b; } template<class T>void chmin(T &a, const T &b) { if (b<a) a=b; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int T; cin >> T; while(T--) { lint A, B, C; cin >> A >> B >> C; lint l = 0; lint r = 1e9+1; while(r-l > 1) { lint m = (l+r)/2; bool ok = true; if(A < m) ok = false; if(C < m) ok = false; if(A+B+C < 3*m) ok = false; if(ok) l = m; else r = m; } cout << l << "\n"; } }
Submission Info
Submission Time | |
---|---|
Task | C - AtCoder AAC Contest |
User | Shun_PI |
Language | C++ 23 (gcc 12.2) |
Score | 300 |
Code Size | 1301 Byte |
Status | AC |
Exec Time | 65 ms |
Memory | 3532 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 3516 KiB |
01_random_01.txt | AC | 65 ms | 3444 KiB |
01_random_02.txt | AC | 65 ms | 3472 KiB |
01_random_03.txt | AC | 65 ms | 3324 KiB |
01_random_04.txt | AC | 65 ms | 3432 KiB |
01_random_05.txt | AC | 65 ms | 3476 KiB |
01_random_06.txt | AC | 65 ms | 3476 KiB |
01_random_07.txt | AC | 64 ms | 3460 KiB |
01_random_08.txt | AC | 65 ms | 3532 KiB |
01_random_09.txt | AC | 65 ms | 3484 KiB |
01_random_10.txt | AC | 65 ms | 3444 KiB |
01_random_11.txt | AC | 65 ms | 3400 KiB |
01_random_12.txt | AC | 65 ms | 3488 KiB |
01_random_13.txt | AC | 50 ms | 3336 KiB |