結果
問題 | No.2198 Concon Substrings (COuNt-CONstruct Version) |
ユーザー | Navier_Boltzmann |
提出日時 | 2023-01-27 23:19:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,104 bytes |
コンパイル時間 | 226 ms |
コンパイル使用メモリ | 82,196 KB |
実行使用メモリ | 71,736 KB |
最終ジャッジ日時 | 2024-06-28 08:09:15 |
合計ジャッジ時間 | 13,607 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 47 ms
56,120 KB |
testcase_01 | AC | 46 ms
55,680 KB |
testcase_02 | AC | 46 ms
55,760 KB |
testcase_03 | AC | 46 ms
56,416 KB |
testcase_04 | AC | 47 ms
56,432 KB |
testcase_05 | AC | 46 ms
56,144 KB |
testcase_06 | AC | 46 ms
56,992 KB |
testcase_07 | AC | 47 ms
56,508 KB |
testcase_08 | AC | 46 ms
56,432 KB |
testcase_09 | AC | 49 ms
57,948 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 62 ms
65,304 KB |
testcase_13 | AC | 65 ms
68,756 KB |
testcase_14 | AC | 63 ms
67,040 KB |
testcase_15 | AC | 58 ms
65,692 KB |
testcase_16 | AC | 45 ms
55,856 KB |
testcase_17 | AC | 48 ms
56,008 KB |
testcase_18 | AC | 48 ms
56,444 KB |
testcase_19 | AC | 47 ms
56,128 KB |
testcase_20 | AC | 48 ms
57,048 KB |
testcase_21 | AC | 51 ms
58,920 KB |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | AC | 62 ms
65,168 KB |
testcase_25 | AC | 65 ms
69,156 KB |
testcase_26 | AC | 63 ms
67,224 KB |
testcase_27 | AC | 73 ms
68,152 KB |
testcase_28 | AC | 47 ms
55,500 KB |
testcase_29 | AC | 46 ms
56,128 KB |
testcase_30 | AC | 46 ms
56,232 KB |
testcase_31 | AC | 47 ms
56,060 KB |
testcase_32 | AC | 46 ms
56,164 KB |
testcase_33 | AC | 46 ms
56,700 KB |
testcase_34 | AC | 47 ms
56,980 KB |
testcase_35 | AC | 46 ms
56,464 KB |
testcase_36 | AC | 46 ms
56,772 KB |
testcase_37 | AC | 46 ms
55,988 KB |
testcase_38 | AC | 48 ms
56,152 KB |
testcase_39 | AC | 47 ms
56,536 KB |
testcase_40 | AC | 47 ms
56,532 KB |
testcase_41 | AC | 48 ms
56,692 KB |
testcase_42 | AC | 47 ms
57,772 KB |
testcase_43 | AC | 48 ms
58,000 KB |
testcase_44 | AC | 47 ms
56,724 KB |
testcase_45 | AC | 47 ms
58,252 KB |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | AC | 65 ms
66,172 KB |
testcase_54 | AC | 63 ms
64,384 KB |
testcase_55 | AC | 65 ms
68,196 KB |
testcase_56 | AC | 61 ms
64,456 KB |
testcase_57 | AC | 63 ms
66,060 KB |
testcase_58 | AC | 64 ms
67,596 KB |
testcase_59 | AC | 60 ms
67,212 KB |
testcase_60 | AC | 64 ms
66,512 KB |
testcase_61 | AC | 66 ms
66,996 KB |
testcase_62 | AC | 59 ms
66,280 KB |
testcase_63 | AC | 64 ms
68,120 KB |
testcase_64 | AC | 65 ms
69,100 KB |
testcase_65 | AC | 66 ms
67,300 KB |
testcase_66 | AC | 66 ms
67,708 KB |
testcase_67 | AC | 70 ms
68,656 KB |
testcase_68 | AC | 63 ms
69,452 KB |
testcase_69 | AC | 67 ms
67,148 KB |
testcase_70 | AC | 95 ms
70,816 KB |
testcase_71 | WA | - |
testcase_72 | AC | 67 ms
66,332 KB |
testcase_73 | AC | 59 ms
66,776 KB |
testcase_74 | AC | 65 ms
69,124 KB |
testcase_75 | AC | 100 ms
71,056 KB |
testcase_76 | AC | 67 ms
67,096 KB |
testcase_77 | AC | 65 ms
69,208 KB |
testcase_78 | AC | 128 ms
70,432 KB |
testcase_79 | AC | 69 ms
65,296 KB |
testcase_80 | AC | 65 ms
68,636 KB |
testcase_81 | AC | 101 ms
69,876 KB |
testcase_82 | AC | 60 ms
67,208 KB |
testcase_83 | AC | 67 ms
68,024 KB |
testcase_84 | AC | 63 ms
67,020 KB |
testcase_85 | AC | 64 ms
68,004 KB |
testcase_86 | AC | 62 ms
68,296 KB |
testcase_87 | AC | 134 ms
70,512 KB |
testcase_88 | AC | 64 ms
66,880 KB |
testcase_89 | AC | 67 ms
66,760 KB |
testcase_90 | AC | 104 ms
70,784 KB |
testcase_91 | WA | - |
testcase_92 | AC | 103 ms
69,408 KB |
testcase_93 | AC | 60 ms
66,536 KB |
testcase_94 | AC | 97 ms
70,112 KB |
testcase_95 | AC | 96 ms
69,092 KB |
testcase_96 | AC | 108 ms
71,364 KB |
testcase_97 | WA | - |
testcase_98 | WA | - |
testcase_99 | AC | 68 ms
66,932 KB |
testcase_100 | AC | 134 ms
70,900 KB |
testcase_101 | AC | 102 ms
71,168 KB |
testcase_102 | AC | 64 ms
67,272 KB |
testcase_103 | AC | 67 ms
66,852 KB |
testcase_104 | AC | 140 ms
71,736 KB |
testcase_105 | AC | 103 ms
71,140 KB |
testcase_106 | WA | - |
testcase_107 | AC | 68 ms
67,380 KB |
ソースコード
from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline M = int(input()) def fcr(n): ng = math.ceil(n**(1/3)) + 100 ok = math.ceil(n**(1/3)) - 100 while ng-ok>1: mid = (ng+ok)//2 if mid**3<=n: ok = mid else: ng = mid return ok if M <= 10**6: N = fcr(M) delta = M - N**3 if N**3+N > M: N -= 1 Y = N-1 Z = N W = N X = M - N**3 - N ans = ['c','o'] + ['n']*X + ['c']*Y + ['o']*Z + ['n']*W print(''.join(ans)) exit() N = fcr(M) for k in range(-1,2): W = N + k flg = False for i in range(-1000,1000): Z = N+i for j in range(-1000,1000): Y = N+j if (1< M - W*((Y+1)*Z+1) + W + Y + Z<=59998)&(M >= W*((Y+1)*Z+1)): flg = True break if flg: break if flg: break X = M - W*(Z*(Y+1)+1) ans = ['c','o'] + ['n']*X + ['c']*Y + ['o']*Z + ['n']*W print(''.join(ans))