提出 #76694202


ソースコード 拡げる

from atcoder.segtree import SegTree
import math
import heapq
def solve(a,b,c):
    
    while max([a,b,c])!=a:
        a,b,c=b,c,a
    if a>=b+c:
        return max(b-1,0)+c
    else:
        if a<3 or b<3 or c<3:
            return a-1
        else:
            return (a+b+c)//2

        
        

   

            
        
        


        
        


    



if __name__=="__main__":
    for _ in range(int(input())):
        a,b,c=map(int,input().split())
        print(solve(a,b,c))

提出情報

提出日時
問題 B - Circular RPS
ユーザ st0123
言語 Python (PyPy 3.11-v7.3.20)
得点 0
コード長 528 Byte
結果 WA
実行時間 1259 ms
メモリ 114100 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 0 / 500
結果
AC × 1
AC × 1
WA × 18
セット名 テストケース
Sample 01_sample_01.txt
All 01_sample_01.txt, 02_small_01.txt, 02_small_02.txt, 02_small_03.txt, 02_small_04.txt, 02_small_05.txt, 02_small_06.txt, 02_small_07.txt, 02_small_08.txt, 03_rand_1_01.txt, 03_rand_1_02.txt, 03_rand_1_03.txt, 03_rand_1_04.txt, 03_rand_1_05.txt, 04_rand_2_01.txt, 04_rand_2_02.txt, 04_rand_2_03.txt, 04_rand_2_04.txt, 04_rand_2_05.txt
ケース名 結果 実行時間 メモリ
01_sample_01.txt AC 124 ms 111400 KiB
02_small_01.txt WA 1192 ms 113072 KiB
02_small_02.txt WA 1190 ms 113788 KiB
02_small_03.txt WA 1257 ms 113716 KiB
02_small_04.txt WA 1192 ms 113748 KiB
02_small_05.txt WA 1184 ms 113692 KiB
02_small_06.txt WA 1182 ms 113804 KiB
02_small_07.txt WA 1179 ms 113624 KiB
02_small_08.txt WA 1191 ms 113812 KiB
03_rand_1_01.txt WA 1246 ms 113788 KiB
03_rand_1_02.txt WA 1254 ms 113204 KiB
03_rand_1_03.txt WA 1259 ms 113312 KiB
03_rand_1_04.txt WA 1240 ms 113104 KiB
03_rand_1_05.txt WA 1232 ms 113360 KiB
04_rand_2_01.txt WA 1243 ms 113828 KiB
04_rand_2_02.txt WA 1254 ms 113860 KiB
04_rand_2_03.txt WA 1223 ms 113872 KiB
04_rand_2_04.txt WA 1239 ms 114100 KiB
04_rand_2_05.txt WA 1256 ms 113624 KiB