QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#864941 | #9909. 阿尔塔尔 2 | ShadowShark | 100 ✓ | 102ms | 4096kb | C++14 | 1.2kb | 2025-01-21 11:34:45 | 2025-01-21 11:34:45 |
Judging History
answer
#include <bits/stdc++.h>
#include "altar.h"
using namespace std;
/*char visual[301][301];
bool sense(int u, int v) {
if (visual[u][v] == '1') return true;
return false;
}
*/
int status[301][301];
int find_ans(vector<int> nominee) {
srand(time(NULL));
int m = nominee.size(), pick = rand() % m;
pick = nominee[pick];
vector<int> future;
for (auto u: nominee) {
if (u == pick) continue;
if (status[u][pick] == -1) {
status[u][pick] = sense(u, pick);
status[pick][u] = 1 - status[u][pick];
}
if (status[u][pick]) future.push_back(u);
}
if (future.size() == 1) return future[0];
if (future.size() == 0) return pick;
return find_ans(future);
}
int altar(int n) {
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
status[i][j] = -1;
vector<int> nominee;
for (int i = 1; i <= n; i++)
nominee.push_back(i);
return find_ans(nominee);
}
/*
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
cin >> visual[i][j];
cout << "Answer: " << altar(n);
}
*/
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 102ms
memory: 3968kb
input:
300 $NE[`FN8(GUPU5JN"+-?S9BD8AV29KPSV*_J33@A;BIC>PLD;? .O`)V,Q^WPM3M4>+@W$GJ`Y_.Z`%'?1?VO645/Y";"E_RDLBU# ,V\*=ZO>6J0[,*9XVA[<<O\RJN9]B`&^4-`QV(&Z=$T7(05"2! (EOLI9X](E0V.HG`B&5QBMXJ-<8;ITS5_FL>S-BEC[FUH9?J'" AH#FYE-:C9OC>N*WMNIHYIDSSG=2Z2:0/B/B=-]QBJ^61]LG_! CL92HRY]<1P<VF$>Q>;<F*1>)DH'5$VA3>A&1'0;Y...
output:
Accepted. 174372 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 581.240000
Subtask #2:
score: 10
Accepted
Test #2:
score: 10
Accepted
time: 79ms
memory: 3968kb
input:
300 `XP``88`X:`X>Y`]@X^P`](^P[WY^`^V^P`NX`[L`@P```\^^@ 6TTR>ADPJM9+/E@WNROG<_$_86,9W_OY?X`C\0Z&`HX^\X>]U/ ):ZQ'QR&1'-&(S/\W18D.`"`LK&):>6=P\?R^HEC>TZ]VD//;( X]]@0Y[\/\_K$\H><O`ZG`I`6V'GPP,O`^P^_4@^`\^``>00P$ 37/M$=="F&4RBMTO.UV=T@Q`K;"378&X\O8=`*LY`]O@`KDDW" .0(X$/_GSCLY1_:X'\;OZ0Y@6NB:\\C\>`<O`E8]@...
output:
Accepted. 181144 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 603.813333
Test #3:
score: 10
Accepted
time: 100ms
memory: 4096kb
input:
300 5OE?M21ZC3S/R%Q3L;V2'%M1ZRB"0^#J%_.A5(KTQ-=UM-1-`& _73M@`3L&)W\.!1Y-T!+?B_&1'=BZBPDGGHWT*!=I]^*/T)Y90 %HX#N%@(=R.Q,)2R$RCRSAHG1+FBU7?&&?PI)/^;\1/]3$/]T' %!\M8T)7:0U_*E^GG.@C,!0=\MR4<61>D$<<5W<P,%_N,!Z<1" \?+TT5<N#+&YOV77_-5*"C8B(]9=Q)1V!4?GV!R%,36/7Q:&$! 1D]6'2EO3S)%B`1.4GJ48,&Q09S:[T\\"L\(KS'>^...
output:
Accepted. 175706 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 585.686667
Subtask #3:
score: 80
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #4:
score: 80
Accepted
time: 80ms
memory: 4096kb
input:
300 .&(6P[JSS(#6@H4\H?I8>56PGMHQ9OLB`X%0&SZ`[0\Z9GSXT/ GCDK8^5:Z$BKPRJ^40UL/CK(4W49%WVQ`:CH#Z]@^H^=-4Z\:( @R@```_]`\@`X\_`\0`X8@XP```OO`_Z`>Z<L__`_``@_Z^^N( III[6,67_1I[<-;`5$^KDI[RE^%'B>.]@GIJ1/`(N:0(S5_=W" 555^KF+,@)5^.'N@[B?V25^9S?#DQO'_04U5)H`LXMH$:+@0\! +/K@^TFF0'K_/HW0^1P[IK?.:0BR=8$`P*?+ET`X@...
output:
Accepted. 180222 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 600.740000
Test #5:
score: 80
Accepted
time: 80ms
memory: 3968kb
input:
300 XVN`0_.XL``\XVVPLPF``^0OP_WX`@@;`9U`VN8(6(<`[@`5P8 \[50(W'\VW`=\Q9VRHSV[?(X(@TL=P0M;)SK[GCBK$M@]P8CG$ 6>IF$$BR;\@'99ECY!2+2H$[DN*6EX(1.%*6-421V!W/94,1D" )!%CBB!1B""#))!11!)E!1"B17!!#A$)!#E)A!)A9!#!-A!I!! 8```_``````@@8`P`X````__\<@``^\`D^`8`_^X@_`P`^T`@" K$N=9)-7<`T!$D5%()3*[[email protected]]_!CB)JC:+#K'...
output:
Accepted. 173556 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 578.520000
Test #6:
score: 80
Accepted
time: 98ms
memory: 3968kb
input:
300 6'>'&@"W)D]U@'WOF^[Y#\))QW@QF^:+VKURFY-U$1\")W0GY4 LR1DCFA;E2?;'"<`Q_=]B>%-9T0:[[OM;>\[+5-;,KN>5\&8]* F:I228!E1)0^PBL<98PMQ/#GM^H9*>'7NK>>&+#P!U7CK^C*_% [email protected](JO<:A:.=:Q!NWH`\EZ:0%V9E5J-<\Z9>3:`JIK8@[C$ W`(,<V`_L5M.TV&RB?IE"5K.A"_NN9@(!^Q!82NU43[@#5AF?! Q!S>$VRKZ(/*3(<&(ALZLP/Z<Y$9M6:^/45>?8(2W...
output:
Accepted. 175812 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 586.040000
Test #7:
score: 80
Accepted
time: 99ms
memory: 4096kb
input:
300 '@[email protected]^M8%D'@ETE<\7'!6L8ELW89WC2FDO6',\*B0V\*>D= $PF'4\GT5XLD4D0S:YBVD$ILH$S*>*M\RLQ2W;J.MEQO_V-G2+ RVSD*>49P\F2A2(Z-^U_RBSVS"Z%P.WMU=YI,01?739$N?%T)( 8O#-.8'<-+%0$(^O:9MBFP-@D^P)%\&F"2\L5+FAQX(5AVU]\! EK,P:9Y;>D-YX)N2XR$F&LZ3DPA\U;5%\`A-F;<0<B)H%J.RI! 46FU/-]NO2WNLE2A^YACTV=)B8Q>+,<[N<!E7^NHJ...
output:
Accepted. 174611 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 582.036667
Test #8:
score: 80
Accepted
time: 99ms
memory: 4096kb
input:
300 5RL\JZHZE-Q]$GA?H?I(6J\%3VAO^,1/:GZ,@RTUWU#1WXRIA% K&V^W]T5;/?;",3O40VBO/>HJ;13_E;HMS[A(Y>K;[")`\9U1# C@&F&"GU_]D3`-F1-U%JC>\@[TT?E6<M[-LO^,4]"Q*[#3_^T' PQ`14LE2J=]WN:L8LF%X/R#S6^O3"7:`E4K'ULU"`H`,GX:27" [(!22A*N0RI%PX.'$>RJ;H_XUAJ(:8#Q-TK<VC-@)=NO!54X." ,M.VH,;53(O:<W[Z3:SH"MA96PC5SV_0REI2^O5QW...
output:
Accepted. 174963 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 583.210000
Test #9:
score: 80
Accepted
time: 97ms
memory: 4096kb
input:
300 "!"!A"FAO!,#:!!CZA-Q!!!%KQ)%Q=1I"#E1%"#+6!!!\+",1! #!)"QAQ#1Q"*-#21%%"9!!3#L!)!2IBE!"293,*)L!%C9%A2+% 4]`Z:`RZ@KH8OB_=PP`>_^,,`^_`W\69^`@`[`P`R`G^X4S\&( !11!%95!%)2+C17!(2!/!!AQP1D1F$#&3"!]]!3,+!$#(!2"#! A>`GP^>_H[JF\:@`H`*P'U4WX`@YR?6PJ`X0?L`@/`:PZOM_F! /_&$<`_@Z6`[.V`\`^N@(:<[L`_];HOD=0D(P_V@H...
output:
Accepted. 175865 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 586.216667
Test #10:
score: 80
Accepted
time: 34ms
memory: 4096kb
input:
121 T@5:-E]M+A*@^IJ>O.4M J.K-'G@7&Y%L/=U%4G.@ I'V',2<L#=C6C/;H*T%, O-V)>@,+G3)R7/K/*%6# 8A;OLO&5@:F30(5H-Q+" WI_9*[<8"4O3R32=<G]" ?5@%E]M+E*7N+IJG-4_ 0K/37XW6SEP/NU?4G*@ [<]U&I0TKNJ1DHSN-># D+DEEG6B/R,8"FVN:T& `D/>2YRM9,OUYJ5L<8! 8"HO)N=7^*6+]&OF0$! #'LI<$R?EJUT2V:$I4 !$^]NB[,\5\\I\E1W* C2_[W1N&=+N=...
output:
Accepted. 90518 u2930hioewfbjkadvhhi4t
result:
ok Perfect. 301.726667