QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#784322 | #6660. 택시 여행 | HildaHu | 29 | 185ms | 60536kb | C++14 | 3.3kb | 2024-11-26 14:34:08 | 2024-11-26 14:34:09 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
#define inf 9e18
using namespace std;
const int N = 100010;
int n, a[N], b[N], id[N], f[N];
bool cmp(int x, int y) {return b[x] > b[y]; }
void Max(int &x, int y) {if (x < y) x = y; }
void Min(int &x, int y) {if (x > y) x = y; }
struct edge{
int to, nxt, w;
}e[N << 1];
int head[N], cnt;
void add(int u, int v, int w) {
e[++cnt] = (edge) {v, head[u], w}, head[u] = cnt;
}
int rt, sum, son[N], siz[N];
int lnk[N], dep[N], dis[N][20];
bool vis[N];
void get_rt(int x, int fa, int Dep = 0) {
siz[x] = 1, son[x] = 0;
for (int i=head[x]; i; i=e[i].nxt) {
int y = e[i].to;
if (vis[y] || y == fa) continue;
if (Dep) dis[y][Dep] = dis[x][Dep] + e[i].w;
get_rt(y, x, Dep);
siz[x] += siz[y], Max(son[x], siz[y]);
}
Max(son[x], sum - siz[x]);
if (son[rt] > son[x]) rt = x;
}
void build(int x) {
vis[x] = true;
for (int i=head[x]; i; i=e[i].nxt) {
int y = e[i].to;
if (vis[y]) continue;
rt = 0, sum = siz[y];
get_rt(y, x), dep[rt] = dep[x] + 1, get_rt(rt, 0, dep[rt]);
lnk[rt] = x, build(rt);
}
}
#define pii pair<int, int>
#define fir first
#define sec second
#define mk make_pair
struct node{
vector<pii> s;
node() {s.clear(); }
bool cmpl(pii a, pii b, pii c) {
if (b.fir == c.fir) return b.sec >= c.sec;
return (__int128)(b.sec - a.sec) * (c.fir - b.fir) >= (__int128)(c.sec - b.sec) * (b.fir - a.fir);
}
void add(pii k) {
while (s.size() > 1 && cmpl(s[s.size() - 2], s[s.size() - 1], k)) s.pop_back();
if (s.empty() || s[s.size() - 1].fir != k.fir) s.push_back(k);
assert(!(s.size() > 1 && s[s.size() - 2].fir == s[s.size() - 1].fir));
}
int calc(int i, int k) {return s[i].sec - s[i].fir * k; }
int query(int k) {
int l = 0, r = s.size() - 1;
while (l + 5 <= r) {
int mid = (l + r) >> 1;
if (calc(mid, k) < calc(mid + 1, k)) r = mid + 1;
else l = mid;
}
int ret = inf;
for (int i=l; i<=r; ++i) Min(ret, calc(i, k));
return ret;
}
}t[N];
void solve() {
for (int i=1; i<=n; ++i) id[i] = i;
sort(id + 1, id + n + 1, cmp);
memset(f, 0x3f, sizeof(f));
f[1] = 0;
for (int i=1; i<=n; ++i) {
int x = id[i];
int p = x, Dep = dep[x];
while (p) {
Min(f[x], t[p].query(dis[x][Dep]));
p = lnk[p], --Dep;
}
if (f[x] >= inf) continue;
p = x, Dep = dep[x];
while (p) {
t[p].add(mk(-b[x], f[x] + a[x] + b[x] * dis[x][Dep]));
p = lnk[p], --Dep;
}
}
for (int x=1; x<=n; ++x) {
int p = x, Dep = dep[x];
while (p) {
Min(f[x], t[p].query(dis[x][Dep]));
p = lnk[p], --Dep;
}
}
}
// f[y] + a[y] + b[y] * dis[y] = -b[y] * dis[x] + f[x]
vector<int> travel(vector<int> A, vector<signed> B, vector<signed> U, vector<signed> V, vector<signed> W) {
n = A.size();
for (int i=0; i<n-1; ++i)
add(U[i] + 1, V[i] + 1, W[i]), add(V[i] + 1, U[i] + 1, W[i]);
for (int i=1; i<=n; ++i)
a[i] = A[i - 1], b[i] = B[i - 1];
rt = 0, sum = son[0] = n;
get_rt(1, 0), dep[rt] = 1, get_rt(rt, 0, 1);
build(rt);
// printf("lnk: "); for (int i=1; i<=n; ++i) printf("%d ", lnk[i]); putchar(10);
// for (int i=1; i<=4; ++i) {
// printf("dis %d: ", i); for (int j=1; j<=n; ++j) printf("%d ", dis[j][i]); putchar(10);
// }
solve();
vector<int> ans;
for (int i=2; i<=n; ++i) ans.push_back(f[i]);
return ans;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 7
Accepted
time: 0ms
memory: 13344kb
input:
2 684124582850 713748627948 74361 256955 0 1 661088
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 733283747618 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 3 lines
Test #2:
score: 7
Accepted
time: 2ms
memory: 14408kb
input:
3 251115773325 363097865287 358609487841 826785 213106 914768 0 1 851938 2 0 231697
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 955485332655 442679377470 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 4 lines
Test #3:
score: 7
Accepted
time: 2ms
memory: 14196kb
input:
3 489998888627 318672977903 70353752652 258347 458793 258657 2 1 156120 0 2 524840
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 665922861747 625589728107 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 4 lines
Test #4:
score: 7
Accepted
time: 1ms
memory: 11508kb
input:
3 737471938521 315388610250 818943569900 726908 666797 564862 0 1 460302 0 2 785280
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1072069144737 1308298252761 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 4 lines
Test #5:
score: 7
Accepted
time: 0ms
memory: 14608kb
input:
4 201836820267 208957719162 992553400562 566050337171 243994 65303 590123 936951 1 0 259719 0 3 860376 3 2 513584
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 265206697953 537074816507 411763402011 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 5 lines
Test #6:
score: 7
Accepted
time: 2ms
memory: 16344kb
input:
4 440719935569 160237864481 704297665373 767778991240 451998 371509 46564 828427 1 0 861960 1 3 830699 2 3 185693
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 830324131649 1289731282865 1205798418251 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 5 lines
Test #7:
score: 7
Accepted
time: 0ms
memory: 13988kb
input:
5 148262899914 9382086008 622202345986 443806901161 213829280326 178155 503016 333953 572340 461148 0 3 453941 3 2 84057 4 0 171136 3 1 598794
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 335812903839 244109933604 229134758769 178751633994 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 6 lines
Test #8:
score: 7
Accepted
time: 2ms
memory: 13660kb
input:
5 391440982512 969252165920 333946610796 649830522527 902812044171 522045 996458 225429 545971 667483 0 1 701500 0 4 514779 2 1 435377 3 0 919439
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 757655550012 984941935977 871429515267 660178785567 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 6 lines
Test #9:
score: 7
Accepted
time: 1ms
memory: 11460kb
input:
17 315015458526 65513576283 829720084774 654640079244 561177336848 463903843105 496216524512 837433489064 92734412345 807145138979 250511786518 915329126804 373916658654 78276842047 121976569238 432447179015 519384539551 696133 642473 231377 987220 589587 337763 790202 785083 249580 108311 73808 892...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 430639669161 417840567823 403532946274 499079112962 498466070651 495984520010 499402357184 501387707132 498265325456 501233852966 474661031682 494612046266 411867746683 497598865088 499819422548 496976423075 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 18 lines
Test #10:
score: 7
Accepted
time: 0ms
memory: 14204kb
input:
20 764145449871 794297102632 450082553736 427358261877 587251097098 98567356955 15910789509 321286084089 25839798358 969219436118 975479420690 937908953492 410498404545 180209954689 302999489632 849828117651 171771046425 800442975277 295169929534 146003957886 828538 724406 733109 79844 665172 652593...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1384833390877 871900130923 1446847771547 1245326093057 924349900475 1046486123707 1063981383357 864751505059 1159443240947 824076089025 1448542597977 1486181926466 1488465960086 1424780088987 1478403270966 1303312410681 1485431478966 1135576549657 1412080059777...
result:
ok 21 lines
Test #11:
score: 7
Accepted
time: 2ms
memory: 14076kb
input:
20 286866076510 666296858783 319893290745 436172872006 579306725182 388780143357 429085643976 163864091991 334402956892 573150791451 971047548996 924353133556 82495144441 364862686518 76783079529 74022380610 978776791995 17833817791 637808249822 150520055702 705613 111460 694926 702547 748042 671482...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1345583882860 995125125260 815198043938 1295987956432 1034264067144 888082221934 1247814963646 1225117709350 631676569994 1289347270738 404306893004 1347095564962 373415155864 1441975557454 1167058795516 1091947224281 1373264198836 795244013911 1127743556434 se...
result:
ok 21 lines
Test #12:
score: 7
Accepted
time: 2ms
memory: 14380kb
input:
20 161996998737 15089127085 28063038428 574601167323 736141386895 762192247356 788118187801 956063872362 580983462657 839554694910 471536078792 781164874294 363054673222 809510755913 153755418459 78171544930 969593469579 864779185396 408120998971 610129629325 933618 563940 506188 824442 64614 396381...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1870873819056 1340292002469 2180029603234 1667979150565 2084831816447 1131232525437 1898452835615 1742994070672 2139665843266 1042857179175 2148449164384 1856727805178 2077059488718 1931794896836 1753987714167 1864830429393 1705470391803 1529058594761 197326523...
result:
ok 21 lines
Test #13:
score: 7
Accepted
time: 2ms
memory: 16208kb
input:
20 443174843835 295023765677 175861678382 805210665445 724299682774 889923334441 967560897715 857729286838 7238459275 901083586058 887820756720 681912091803 886476957360 821901344613 222491154905 602669810322 953890359316 822857333786 674877086360 498973934687 505612 0 0 0 913180 49780 0 0 0 0 0 0 0...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 737522649521 561660971139 737522649521 737522649521 737522649521 737522649521 637744453675 737522649521 737522649521 737522649521 737522649521 737522649521 737522649521 737522649521 737522649521 737522649521 608216207263 737522649521 737522649521 secret: XBNN6R...
result:
ok 21 lines
Test #14:
score: 7
Accepted
time: 2ms
memory: 16192kb
input:
20 903941728884 384581140226 453502499061 225752209240 885300062423 504103937164 667092163600 460139456041 109118743857 207444296671 30492319139 345381827436 453966959387 438774451871 860637725773 554202343964 68114298125 781071441103 276250637196 155641220254 635683 100430 56855 0 0 0 0 0 0 142765 ...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1332715633531 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 1792855089572 179285508...
result:
ok 21 lines
Test #15:
score: 7
Accepted
time: 2ms
memory: 13192kb
input:
20 1000000000000 7 1000000000000 13 1000000000000 1000000000000 13 5 1000000000000 1 1000000000000 1000000000000 12 6 1000000000000 3 16 18 10 7 1000000 999999 1000000 999997 1000000 1000000 999994 999993 1000000 999991 1000000 1000000 999988 999987 1000000 999985 999984 999983 999982 999981 0 1 691...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1691757000000 2096049595714 2464529227234 2563764929539 3034748516584 3885772963503 4460798513342 4641761246599 4842046844590 5574182255313 6059278889404 6615402884243 7286465831403 7388442505695 8143381691358 8628101420456 8760501302040 9298906149020 934426333...
result:
ok 21 lines
Test #16:
score: 7
Accepted
time: 2ms
memory: 14888kb
input:
20 10 15 3 4 6 14 1000000000000 8 1000000000000 6 17 1000000000000 0 8 1000000000000 3 1 8 12 16 1000000 999999 999998 999997 999996 999995 1000000 999993 1000000 999991 999990 1000000 999988 999987 1000000 999985 999984 999983 999982 999981 0 1 197220 1 2 436230 2 3 822675 3 4 179287 4 5 533151 5 6...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 197220000010 633449563795 1456122918448 1635409380591 2168558247993 3065579762877 3926280459352 4087349331870 4728183845997 5358220175625 6266419093562 6968130076382 6985723865254 7299499786122 7859580504978 8093366998131 8775636081652 8926139523058 89838064850...
result:
ok 21 lines
Test #17:
score: 7
Accepted
time: 2ms
memory: 13916kb
input:
20 189782427733 285711699711 42839202308 323857876000 491102770223 681197470430 741563850085 770118022455 236662937828 460527070346 322304516149 407948067776 906756099567 581345187071 10531309090 96685590997 305996515557 289017611132 724839278560 441981934920 302755 557771 282205 475620 535221 82793...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 428459937493 646884046018 786290613318 982412880278 1253753718723 1534543706731 1557981114186 1577129287846 1819713270256 1848657061671 1871811459826 1890197068014 1919674253318 1934026950320 1960801118622 1977403784892 2009788771930 2014313798884 2035519586570...
result:
ok 21 lines
Test #18:
score: 7
Accepted
time: 0ms
memory: 13316kb
input:
19 20 4869939079 4869939079 1475687061 1475687061 236769056 120502350962 120502350962 4869939079 4869939079 236769056 696947 285 120502350962 12127756717 4061942829 35001226351 18770227218 120502350962 19715 22 1 6 22 1 1 1 3 14 1 1585 33 1009 14 3213 1 14 14 1 17 843518 0 13 773363 11 4 331406 2 0 ...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 6924732785 6923485436 6926848862 6925037261 6925431365 6924291344 6925858616 2051937220 6924502370 6924477974 6924043043 6924060575 6924508628 6925731629 6927300020 6924874217 6927263339 6925002536 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 20 lines
Test #19:
score: 7
Accepted
time: 0ms
memory: 15048kb
input:
20 22046 112845211637 272306351675 112845211637 2955509 7124 272306351675 64027867 595719023 2639297777 49993722591 49993722591 7124 2955509 373774 6 112845211637 360 112845211637 595719023 22772 17 4 1 17 39 8 240284 1 3 810 1 123 3 123 8 810 17 4 17 19 7 180627 18 3 992529 3 5 719911 10 9 467836 1...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 8894945676 8905143436 8886696844 8891169804 8892456132 8896006124 8888993412 8899307516 8886297524 8890040212 8897465804 8889166860 8896770972 8875081844 8871537806 8885825164 8879227404 8878756612 8887548396 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
ok 21 lines
Test #20:
score: 0
Wrong Answer
time: 2ms
memory: 14436kb
input:
20 7234739 60192 544422 1777110503 27883 243631 243631 15640571101 372138737 1 7234739 6282190524 1777110503 261389065797 15640571101 498987 243631 261389065797 261389065797 44277685886 15 10168 10168 7 52 1 164 15 3 15 7 1848 106 1 3 1848 1848 31 1 52 12 9 169781 9 14 222132 19 17 534510 18 1 48584...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 45095863 45336485 45729553 46621588 41331674 44935072 47322710 44579608 28251854 43964995 33863309 25705139 47488454 31583834 45695248 45985358 45308609 44610015 45843119 secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I
result:
wrong answer 2nd lines differ - expected: '13842793', found: '45095863'
Subtask #2:
score: 0
Wrong Answer
Test #31:
score: 8
Accepted
time: 160ms
memory: 54316kb
input:
100000 746699125678 374834842799 250803643493 620187038832 454433387570 406226564003 897157438699 99473514061 734784419618 503968957100 363935477037 277126009840 52078020050 990757079812 847235285349 950784717285 271017141367 861087225700 996035427219 520682200664 282013988419 415183977876 882007771...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1148030742334 1636760433058 2131282232650 2353514637869 2672707119337 2763307672337 2948215735597 3003888852169 3054019822989 3117708941277 3168979051095 3214001638323 3269286229765 3273106480907 3287227043365 3335909595067 3361857042147 3364657567217 338173015...
result:
ok 100001 lines
Test #32:
score: 8
Accepted
time: 185ms
memory: 54600kb
input:
99999 199936403206 387848228799 134551775973 379377394692 83082074622 879859342494 648173966597 944650644236 499996263229 902471096917 590863268927 40584929392 906714919013 233728229536 286705399400 944576541664 998941389868 610718110168 422760120374 346110411150 812871715907 273865436932 3195132627...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 697799158816 929607027922 1018095086086 1584613641145 1877765365665 2239699168305 2438089294735 2832345576485 2927526977455 2931605531105 3195571528127 3387289232535 3446336905209 3460262616504 3466765570662 3469379135670 3491001700992 3497511229992 35078529774...
result:
ok 100000 lines
Test #33:
score: 8
Accepted
time: 163ms
memory: 60536kb
input:
100000 56998 11671 13811 25717 14858 88240 42443 83814 1000000000000 76043 96812 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 96423 8620 1000000000000 1000000000000 21485 33558 27910 1000000000000 1000000000000 1000000000000 1000000000000 88572 61826 1000000000000 22580 8911...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 350836056998 1268196151308 1761927177655 1764058173393 1823989948523 2593985186768 3180555709767 3397318276233 3865405999596 4662149904880 5500125621852 5885446768602 6399152631492 6942124201722 7571623906662 7578166841232 7924285399671 8079299773002 8229842213...
result:
ok 100001 lines
Test #34:
score: 0
Wrong Answer
time: 134ms
memory: 54152kb
input:
100000 14710 1000000000000 25745 978 1000000000000 62317 22444 1000000000000 8347 1000000000000 33719 65677 98665 62278 1000000000000 1000000000000 37800 67542 58652 1000000000000 1000000000000 25465 12743 31814 1000000000000 92966 22056 1000000000000 1067 24490 9396 1000000000000 17174 19345 31055 ...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4...
result:
wrong answer 2nd lines differ - expected: '881904014710', found: '4557430888798830399'
Subtask #3:
score: 0
Skipped
Dependency #1:
0%
Subtask #4:
score: 0
Wrong Answer
Test #69:
score: 17
Accepted
time: 72ms
memory: 42200kb
input:
100000 15175010 23519365 21177669 27079342 9089 16784452 29693960 23124925 17048604 10179491 12828214 24992902 8483134 2928073 23807522 7332137 17421520 28460746 1607282 13224363 11900728 11794692 11495061 4687109 23460275 7657982 27417256 16978162 7326803 23083826 24942987 16610314 12147303 2828271...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 16705757 ...
result:
ok 100001 lines
Test #70:
score: 17
Accepted
time: 108ms
memory: 42908kb
input:
100000 3100890 18869608 28100950 22925442 5793993 25887606 5712025 16783243 22490605 7223603 27212909 19749276 22470322 1196820 23308444 12318305 13271014 12850212 19296071 20606196 7506157 10805123 4563831 23592776 15092259 13668900 4494974 28314546 9688373 16660275 26653405 20265376 23328402 65821...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 10152436 ...
result:
ok 100001 lines
Test #71:
score: 17
Accepted
time: 143ms
memory: 43680kb
input:
100000 4898881 18305237 12063130 27374874 12812852 9581585 26656676 18814205 1975580 29732802 12533206 8654169 13281974 29470109 21077771 11147173 20317258 1899590 1231701 1837026 14666014 27529187 25128649 17927919 2393082 29882706 219479 5639515 22520118 24049393 29505846 8318818 8821258 271856 29...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 16181612 ...
result:
ok 100001 lines
Test #72:
score: 17
Accepted
time: 177ms
memory: 44396kb
input:
100000 9658959 1688342 6240220 16196751 15995317 702494 4633562 20709272 8679477 26984234 10222833 13077081 26697649 11469884 29570755 9065586 17884293 18215818 6448726 5520098 6240783 4305747 18040443 2158997 5243864 2522100 16687823 9072593 6894532 14201161 24816372 18644409 28382396 18744169 2241...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 104636130 1...
result:
ok 100001 lines
Test #73:
score: 17
Accepted
time: 77ms
memory: 42232kb
input:
100000 481659292307 392231013831 600881072802 45680778918 497254838381 693742315003 650297285101 697985684191 905387574080 872450913614 795333685864 6322613767 383178536872 403855157966 479685748303 436426965872 811127952616 108125494897 48164089857 658401197800 865667284396 40015491608 940720973939...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 481672328796 481691087268 481684275730 481688553485 481679985511 481691397690 481663271363 481672030705 481686644783 481671459964 481687816836 481672690271 481677612620 481680259795 481674762449 481677733726 481697163354 481665707220 481676198013 481691042941 4...
result:
ok 100001 lines
Test #74:
score: 17
Accepted
time: 92ms
memory: 42836kb
input:
99123 368085479547 209040965078 341872164496 512883728689 64502160426 292197185605 921658759745 691859574811 117452511459 635433016781 915849642896 577070506352 567345292883 409083250708 3922349146 589841981664 952925955123 232737499162 928422404551 920065732422 963475787142 736180674097 97410604154...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 368140058580 368140496840 368141647144 368134224992 368143195644 368127279034 368141098012 368138851392 368119479205 368138624032 368122165467 368147535980 368123324276 368115651591 368144510392 368125738195 368142018760 368120361485 368139115364 368109549760 3...
result:
ok 99124 lines
Test #75:
score: 17
Accepted
time: 148ms
memory: 43788kb
input:
100000 531539131776 264622902850 982326252487 354041849527 861112725426 726010424034 56930472700 438722738653 730765119449 575201803306 288563828748 118058899083 498146764940 847446096609 702882132423 154425390172 994557129594 650305523837 143800830314 908650692129 669949879758 535681711025 65601431...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 531721212750 531656694760 531718544118 531714379044 531704687152 531729312168 531674322160 531717685656 531730644918 531629494860 531667416156 531661816828 531654860172 531702565396 531699581380 531685749492 531712471348 531718006056 531683331356 531635570944 5...
result:
ok 100001 lines
Test #76:
score: 17
Accepted
time: 167ms
memory: 44000kb
input:
100000 68252977557 107140775554 663737581227 955674405989 880366093281 523256809804 330498449827 140416586809 554297862188 229316498992 851327393258 656014484145 406166050319 840181702979 802843088676 968153381746 876696165642 589273192443 646421978713 676509056604 304849570545 613806791921 56621953...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 68805660997 68695602377 68725703877 68623607377 68701320237 68825551677 68852664497 68838802817 68815499797 68817536167 68881971017 68845022577 68624164937 68674035277 68679964697 68761592577 68853064217 68688488017 68784216797 68688741357 68764855197 688477041...
result:
ok 100001 lines
Test #77:
score: 17
Accepted
time: 175ms
memory: 43624kb
input:
98001 717031222052 331867116389 221882585098 454967007080 223129085016 710978007691 1440804904 400863577822 517713094819 924406511598 929770894084 425299879944 367162704545 61417490984 645160842118 814895080672 439017712275 32898686436 262811271268 516343874528 581688846420 471934819696 686447934916...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 717599955458 7...
result:
ok 98002 lines
Test #78:
score: 17
Accepted
time: 133ms
memory: 43536kb
input:
100000 0 4898881 18305237 12063130 27374874 12812852 9581585 26656676 18814205 1975580 29732802 12533206 8654169 13281974 29470109 21077771 11147173 20317258 1899590 1231701 1837026 14666014 27529187 25128649 17927919 2393082 29882706 219479 5639515 22520118 24049393 29505846 8318818 8821258 271856 ...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
ok 100001 lines
Test #79:
score: 0
Wrong Answer
time: 83ms
memory: 42092kb
input:
100000 30000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 434579 0 0 0 0 0 0 0 0 0 0 0 0...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4557430888798830399 4...
result:
wrong answer 2nd lines differ - expected: '31105951', found: '4557430888798830399'
Subtask #5:
score: 29
Accepted
Test #94:
score: 29
Accepted
time: 66ms
memory: 41720kb
input:
99281 551670361798 568902251563 418071776626 697635341894 641578820039 117221079324 812766431051 425410617978 663769685693 282144284527 799662290178 749088952784 586626406385 122473825417 459510657357 871705247919 443707710712 735612808044 237919555727 829939639783 122127143240 616906466299 24431898...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 598598746654 5...
result:
ok 99282 lines
Test #95:
score: 29
Accepted
time: 89ms
memory: 41828kb
input:
100000 762048253398 544847923340 274220772253 709492519024 93107863549 990677171512 878434244170 777350365410 575870270443 928311965336 349432073756 948390047110 470116186153 495432094032 154258868766 719518553291 580490378718 661863092617 453262793865 191963964294 783054160061 953488248260 99347544...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 764692690700 7...
result:
ok 100001 lines
Test #96:
score: 29
Accepted
time: 118ms
memory: 41468kb
input:
94281 131658172659 39811340435 707706551378 488270943344 316094085836 187344969354 859815132521 257455926058 398461451565 636824600504 968337263051 657378201148 381422070176 704193397218 215057852195 143696981366 245020143023 544889243460 19853724068 381481133078 270430609102 661194702920 9327187294...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 513000148750 5...
result:
ok 94282 lines
Test #97:
score: 29
Accepted
time: 145ms
memory: 41872kb
input:
98013 219274952148 967847968840 993514312942 249215975388 377408063086 409277664478 513688960578 870781013811 5313297905 381786485971 932846528432 355907313844 568982393234 615505455703 556586556337 580222086746 513159753737 447726612888 849878699364 872433100635 459323693660 591180592643 9928561494...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 397148182990 3...
result:
ok 98014 lines
Test #98:
score: 29
Accepted
time: 153ms
memory: 42072kb
input:
100000 793084247557 856407004352 124019471672 758580217324 391555277659 748332370727 824874943785 454763878407 172204390651 200693040566 241971294452 420325832639 276303819033 490288760803 518648078771 428578774460 552156115324 270613111346 564717918818 914239531441 363337438048 359070665547 4058804...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 1347236750935 134723675...
result:
ok 100001 lines
Test #99:
score: 29
Accepted
time: 62ms
memory: 41784kb
input:
100000 186878865231 744364257898 407647146449 178229661742 142659258467 867497410431 566102005411 743741769325 966116499644 374901320569 460953729268 166466122244 599772360298 778326103398 923306353276 541041861259 456336739387 460166266166 277100384431 124520154825 91585321170 808947541069 49305171...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 199304498331 1...
result:
ok 100001 lines
Test #100:
score: 29
Accepted
time: 85ms
memory: 41936kb
input:
100000 701868643554 195683029255 191726673386 60711384096 246001015103 235534486089 867356428487 679339700226 266886499198 165357218261 892542762609 49935133853 78861964822 648163497576 458431664651 259806246005 944174571815 556122544299 640157239681 239448194098 270814892412 832337696089 1764039054...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 786865661638 7...
result:
ok 100001 lines
Test #101:
score: 29
Accepted
time: 123ms
memory: 41940kb
input:
100000 438739740535 795928502119 872639081700 294554691174 226473457726 440783927287 150198126950 915922926283 516380773321 487345449103 452763239700 807838622400 226343342171 740475572228 441100842060 488895978441 476807788781 262972018901 384528067019 387913043837 839407743741 462422811237 7784206...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 865668346868 8...
result:
ok 100001 lines
Test #102:
score: 29
Accepted
time: 153ms
memory: 41864kb
input:
100000 694640698205 388240595320 449732757362 105097389837 586358675392 161335658819 425877820487 740670399542 410740826602 978399832816 430048583471 246136844716 701889327015 378563563646 252509017658 388896850779 573768686022 926987324089 60052463883 832676326751 23069584465 214255472478 621178722...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 4111303149419 411130314...
result:
ok 100001 lines
Test #103:
score: 29
Accepted
time: 165ms
memory: 41964kb
input:
100000 201019608609 385527935698 739383110538 337378782684 721483225535 618691732359 908988547242 991459108034 895675397257 932703191521 917834300839 795973630630 149128715785 276896218486 353219812612 995667048790 530388611932 928955899951 801185000749 128711546773 643155466189 347256189560 2475992...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 2183445012944 218344501...
result:
ok 100001 lines
Test #104:
score: 29
Accepted
time: 126ms
memory: 41976kb
input:
100000 461207015440 477074910334 127605955549 134820278679 890057382559 573472390851 228805638497 91016716163 456111216790 201827979144 262629412298 23148110692 706611869340 591791197580 277224181142 721165258854 396462295378 416270609718 248094333946 179529159354 554660087266 420347767754 981168613...
output:
secret: XBNN6R0Jnospxlfz11GWxd4ldkzb0I 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 461207015440 4...
result:
ok 100001 lines
Subtask #6:
score: 0
Skipped
Dependency #1:
0%