QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#530175 | #9226. Game of Geniuses | ucup-team3712# | AC ✓ | 1ms | 3720kb | C++20 | 2.7kb | 2024-08-24 15:12:45 | 2024-08-24 15:12:45 |
Judging History
answer
//created: 2024-08-24 14:46:01
#if defined(YUANSHEN)
#include<D:/Tovi/template/my_template.hpp>
#else
#include<bits/stdc++.h>
using namespace std;
#define dbg(...) 42
#endif
template <typename T1, typename T2> void cmin(T1 &x, const T2 &y) {
x = x < y ? x : y;
}
template <typename T1, typename T2> void cmax(T1 &x, const T2 &y) {
x = x > y ? x : y;
}
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
#define fixset(x) fixed<<setprecision(x)
#define fi first
#define se second
#define sz(x) (int)(x).size()
#define all(x) (x).begin(),(x).end()
#define ALL(x) (x).begin()+1,(x).end()
const int INF = 1000000000;
const ll LNF = 1000000000000000000;
int a[60][60];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
// vector<map<int,int>>r(n+1),c(n+1);
// vector<int>vis1(n+1),vis2(n+1);
// multiset<int>st;
// for(int i=1;i<=n;i++)
// for(int j=1;j<=n;j++){
// cin>>a[i][j];
// r[i][a[i][j]]++;
// c[j][a[i][j]]++;
// st.insert(a[i][j]);
// }
// for(int _=1;_<n;_++){
// int val=*st.begin(),cnt=1;
// for(int i=1;i<=n;i++){
// if(!vis1[i]) cmax(cnt,r[i][val]);
// }
// for(int i=1;i<=n;i++){
// if(!vis1[i]&&r[i][val]==cnt){
// for(int j=1;j<=n;j++){
// if(vis2[j]) continue;
// c[j][a[i][j]]--;
// st.erase(st.lower_bound(a[i][j]));
// }
// vis1[i]=1;
// break;
// }
// }
// // st.erase(st.lower_bound(val));
// val=*st.rbegin(),cnt=1;
// for(int i=1;i<=n;i++){
// if(!vis2[i]) cmax(cnt,c[i][val]);
// }
// for(int i=1;i<=n;i++){
// if(!vis2[i]&&c[i][val]==cnt){
// for(int j=1;j<=n;j++){
// if(vis1[j]) continue;
// r[j][a[j][i]]--;
// st.erase(st.lower_bound(a[j][i]));
// }
// vis2[i]=1;
// break;
// }
// }
// // st.erase(st.lower_bound(val));
// dbg(vis1,vis2);
// }
// for(int i=1;i<=n;i++)
// for(int j=1;j<=n;j++){
// if(!vis1[i]&&!vis2[j]){
// cout<<a[i][j]<<'\n';
// }
// }
int ans=0;
for(int i=1;i<=n;i++){
int val=INF;
for(int j=1;j<=n;j++){
cin>>a[i][j];
cmin(val,a[i][j]);
}
cmax(ans,val);
}
cout<<ans<<'\n';
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3588kb
input:
3 1 4 9 8 4 2 7 5 7
output:
5
result:
ok 1 number(s): "5"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
50 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2392 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 25...
output:
2500
result:
ok 1 number(s): "2500"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
10 87 94 55 220 109 210 17 114 155 34 31 189 14 214 176 130 58 104 33 37 215 116 218 162 91 1503 225 199 222 43 106 79 127 132 65 129 61 105 213 37 249 110 198 178 216 216 169 97 23 227 246 171 177 26 79 120 130 233 128 41 499 594 964 1180 539 1954 1498 1371 986 1325 46 24 91 171 85 255 2217 233 47 ...
output:
499
result:
ok 1 number(s): "499"
Test #4:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
27 411 303 81 355 191 660 575 150 26 190 659 491 503 105 392 665 710 111 176 25 395 105 234 247 528 641 315 198 707 101 112 342 282 217 457 653 271 261 689 437 155 570 725 386 146 711 498 40 315 502 717 376 52 311 426 271 176 178 365 442 703 547 47 470 633 532 437 634 620 466 539 465 628 8 267 145 2...
output:
166
result:
ok 1 number(s): "166"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
47 1924 592 1145 696 1686 2088 1535 2134 276 2118 1237 441 1255 1738 419 2099 150 653 1842 967 1573 1444 1713 1227 245 1623 1890 708 1629 795 1409 1742 499 966 883 50 1456 1194 1193 2056 1531 557 479 1092 973 1834 1311 1805 768 769 990 324 1836 87 1971 1672 1794 1155 1442 135 1634 628 214 572 2010 9...
output:
247
result:
ok 1 number(s): "247"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
50 1699 1790 925 629 1548 1097 1014 84 458 1689 747 2153 146 384 701 1193 2293 537 1969 180 2352 745 262 407 2056 597 1419 1453 1851 1988 2378 809 1896 1645 554 572 396 779 1716 1427 459 1540 789 166 913 1062 2422 834 173 933 2252 1436 1744 1840 893 2260 2120 126 789 1196 2459 956 2357 2038 2431 249...
output:
141
result:
ok 1 number(s): "141"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
50 2 2 2 2 2 2 1 1 1 1 2 1 1 2 2 1 2 2 1 2 1 1 1 1 2 1 1 1 2 1 1 2 1 2 2 2 1 2 1 2 2 2 2 2 2 2 1 1 2 1 2 2 2 2 2 1 2 1 2 1 1 2 2 1 2 1 2 2 1 2 1 1 1 2 1 1 2 1 2 2 1 2 2 2 1 1 2 2 1 2 2 2 2 2 2 1 2 2 2 1 2 1 2 2 1 1 2 1 1 2 1 1 2 1 2 2 2 1 1 2 2 1 1 2 2 2 1 1 2 2 1 2 2 1 2 1 2 2 1 2 2 2 2 2 2 1 2 1 2...
output:
1
result:
ok 1 number(s): "1"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
50 427 500 1591 980 2010 1858 549 1246 363 1741 2115 587 1001 1 970 829 2337 1856 235 651 2466 2055 1039 1612 2205 406 2389 529 1653 1236 625 605 1787 168 2039 1889 162 1142 960 1722 2016 1519 569 1967 1292 1322 2350 978 2172 672 1865 1604 1414 894 1976 1 2434 1699 689 1286 1354 1549 325 1784 748 21...
output:
1
result:
ok 1 number(s): "1"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
50 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 25...
output:
2500
result:
ok 1 number(s): "2500"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
50 83 94 84 82 95 90 97 100 63 78 62 61 89 99 70 81 75 73 67 94 64 100 96 88 63 69 98 96 77 94 93 86 81 99 64 86 1 83 90 65 64 89 94 74 83 83 75 67 98 72 69 95 70 67 87 71 69 67 70 65 80 62 93 95 50 85 90 64 75 54 56 88 50 76 74 83 88 76 89 99 58 71 53 66 94 56 83 71 53 93 50 69 58 74 73 75 72 93 59...
output:
57
result:
ok 1 number(s): "57"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
9 1784 1904 2187 1930 918 1993 2117 1935 1839 2151 1869 1331 2352 1755 2289 2305 1812 2160 2137 1464 1895 1738 2178 1789 1740 2458 2286 1932 2491 2152 2100 2339 48 1837 2030 2026 2197 2352 2368 2422 2146 2242 2049 2053 1396 1919 1952 2244 1759 2153 620 2445 2010 2472 2407 2450 1873 2188 1865 1989 61...
output:
1464
result:
ok 1 number(s): "1464"
Test #12:
score: 0
Accepted
time: 1ms
memory: 3656kb
input:
50 2500 2499 2499 2500 2499 2500 2499 2500 2500 2499 2499 2499 2500 2500 2500 2499 2500 2500 2500 2500 2499 2499 2499 2499 2500 2500 2500 2499 2499 2500 2500 2499 2500 2500 2499 2499 2499 2500 2500 2499 2500 2499 2499 2500 2500 2500 2499 2499 2500 2499 2499 2499 2500 2499 2499 2500 2500 2499 2500 24...
output:
2499
result:
ok 1 number(s): "2499"
Test #13:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
2 1 1 1 1
output:
1
result:
ok 1 number(s): "1"
Test #14:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
49 2450 1316 1386 2256 1228 1473 2113 1577 1460 1352 1550 1718 1398 1509 1532 2099 1471 1394 1766 2460 2463 1952 1282 1313 1584 2153 1404 1604 1495 1446 2155 1549 1934 1345 2051 2328 2468 1673 1717 1579 1631 1689 2375 1982 2222 1794 1751 1677 1352 1682 2415 1992 1721 2226 1491 1531 1379 1331 1546 13...
output:
1234
result:
ok 1 number(s): "1234"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
2 1 1 2500 2500
output:
2500
result:
ok 1 number(s): "2500"
Test #16:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
50 1340 1289 1267 1317 1357 1360 1308 1348 1307 1351 1272 1268 1330 1304 1289 1339 1300 1261 1342 1322 1354 1305 1273 1270 1351 1338 1257 1268 1326 1305 1281 1275 1325 1328 1261 1292 1323 1294 2441 1306 1312 1251 1299 1340 1291 1318 1304 1341 1333 1336 1255 1307 1297 1272 1298 1338 1311 1251 1331 13...
output:
1440
result:
ok 1 number(s): "1440"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
2 1 1 2 2
output:
2
result:
ok 1 number(s): "2"
Test #18:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
49 1006 847 1384 566 733 1019 795 942 738 1371 656 1165 1114 1039 1436 1097 1389 590 814 501 774 728 1032 1369 1011 1018 1388 1381 1162 662 926 1377 1287 865 1105 1194 1488 548 1248 609 975 641 1060 1499 1322 821 1330 692 1396 662 917 757 1470 934 634 756 1337 1432 1403 1440 1031 1020 514 857 909 12...
output:
580
result:
ok 1 number(s): "580"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
3 1 4 9 8 4 2 7 5 7
output:
5
result:
ok 1 number(s): "5"
Test #20:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
4 2064 269 318 1904 1810 1706 197 1404 1936 2197 1528 398 1258 1306 680 1302
output:
680
result:
ok 1 number(s): "680"
Test #21:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
2 1 2 1 2
output:
1
result:
ok 1 number(s): "1"
Test #22:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
2 1 2 2 1
output:
1
result:
ok 1 number(s): "1"
Test #23:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
3 6 8 5 9 1 4 2 3 7
output:
5
result:
ok 1 number(s): "5"
Test #24:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
10 1575 1793 1756 1611 33 1746 2054 1337 1591 2350 1567 2157 2183 1459 1732 2356 1979 821 2097 2296 1133 1180 2060 1577 1185 1991 900 1389 1392 1114 2158 1853 740 1623 1144 1969 1105 1415 1139 1656 2001 2020 2480 2312 1849 1879 1828 1237 991 2144 1346 1258 1315 1199 1550 2350 2332 1939 1399 909 735 ...
output:
991
result:
ok 1 number(s): "991"
Test #25:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
50 2015 2275 292 2148 585 299 460 2437 310 209 661 2346 2412 1329 527 1709 2198 225 552 821 2175 1194 1308 352 835 925 1786 1232 2419 122 1211 2027 714 756 137 1778 1661 1395 2490 192 1259 2033 766 2200 172 2443 319 841 560 1739 1127 1227 1319 378 1899 845 736 261 1897 2249 324 1185 501 240 1517 179...
output:
174
result:
ok 1 number(s): "174"
Test #26:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
50 2209 2319 1177 2264 2428 1709 1660 1538 2386 1098 1518 1196 1367 1140 1416 1344 1535 1481 2274 1649 2498 974 1288 1590 931 1525 982 1327 1626 1764 1779 2111 2264 1682 2324 2165 1469 1178 1991 2058 1358 997 2311 853 1176 1645 2318 1798 2300 2373 1748 2253 1366 2430 1107 2070 1520 1794 1500 2207 11...
output:
859
result:
ok 1 number(s): "859"
Test #27:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
50 521 966 6 795 1706 2471 1001 214 377 1555 381 717 243 1753 168 886 1720 412 409 1511 1732 1933 129 621 1528 271 649 502 40 660 249 1359 579 477 1059 1 2348 2079 461 2133 702 1072 1863 636 2369 1336 2210 236 686 679 388 1221 2363 1756 2481 1688 477 964 1388 1916 1577 1273 515 1421 1356 1 1911 1830...
output:
2
result:
ok 1 number(s): "2"
Test #28:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
10 1127 618 1 1130 2054 179 2071 2196 216 630 1455 278 1125 2495 537 391 2446 2213 1130 1 2285 272 2125 296 737 817 405 1 2306 831 2376 1168 78 471 1962 1 2321 1026 1400 1897 1389 391 1272 2216 1915 340 1273 1360 1 1497 44 1863 795 1422 1278 1 1985 201 263 1605 2482 1 717 1968 1864 589 522 1188 2278...
output:
1
result:
ok 1 number(s): "1"
Test #29:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
7 17 14 14 11 11 11 11 13 20 18 12 14 17 17 10 15 13 16 18 17 14 12 16 12 10 12 11 12 16 20 14 12 14 20 13 17 14 14 13 10 20 10 19 13 20 11 16 13 19
output:
12
result:
ok 1 number(s): "12"
Test #30:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
50 2365 2043 2211 2397 2059 2364 2384 2032 2306 2482 2434 2286 2492 2371 2348 2204 2119 2332 2212 2445 2315 2230 2400 2214 2362 2129 2199 2460 2439 2355 2476 2040 2180 2006 2427 2278 2292 2486 2251 2193 2457 2288 2378 2036 2243 2300 2237 2244 2159 2212 2500 2499 2500 2499 2499 2500 2499 2499 2500 24...
output:
2499
result:
ok 1 number(s): "2499"
Test #31:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
9 2500 1724 2500 2500 2500 2500 2500 2500 2500 2500 2453 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2279 2500 2500 2500 2500 2500 2500 1580 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 12 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 1753 2500 2500 2500 2500 ...
output:
2500
result:
ok 1 number(s): "2500"
Test #32:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
6 2 17 1 21 24 31 10 25 7 15 12 5 3 9 6 26 11 36 19 14 35 4 23 32 33 16 30 27 13 22 18 28 20 8 34 29
output:
13
result:
ok 1 number(s): "13"
Test #33:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
9 391 841 1323 2304 1674 2006 33 2409 2359 2274 1102 797 2070 1093 209 23 1487 2217 103 2245 1390 2099 2416 385 85 2087 2276 1897 1068 709 2375 2429 1655 46 1438 1149 2185 668 170 314 1039 1091 12 2275 466 1146 927 129 861 1924 534 27 389 881 341 1945 1324 1693 1175 557 3 1254 2306 1684 1114 980 216...
output:
85
result:
ok 1 number(s): "85"
Test #34:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
50 1156 2342 804 1875 499 2391 1710 2088 227 1250 941 399 734 690 513 432 371 2192 1541 1642 1327 2206 1104 493 476 542 1289 331 1735 413 999 2086 2143 2449 1736 195 545 2265 2373 1140 1548 213 522 1402 456 1980 501 609 1994 162 1230 2363 2023 568 267 903 2191 2372 931 1678 1749 326 334 2394 2386 92...
output:
162
result:
ok 1 number(s): "162"
Test #35:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
50 1831 2333 2166 2414 2390 1746 1634 2425 1908 1477 2020 2023 2129 2287 1677 1425 1429 1388 2485 2394 1402 1769 2441 2106 2330 2348 1826 2449 1655 2099 1445 2394 2192 1511 1671 1941 2385 2140 2401 1707 1520 1801 2292 2414 1548 2232 2221 2250 1816 213 1897 2245 1976 1642 404 1705 1622 2018 1627 2137...
output:
1345
result:
ok 1 number(s): "1345"
Extra Test:
score: 0
Extra Test Passed