generated from TNFSH-Programming-Contest/tps-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
littlecube
committed
Sep 13, 2023
1 parent
f04fae4
commit 0be71eb
Showing
45 changed files
with
119 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,5 @@ Alice 先動,並且兩個人接下來輪流移動,請你寫一個程式根 | |
|
||
## 範例輸出 | ||
``` | ||
Bob | ||
Alice | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <bits/stdc++.h> | ||
#define ll long long | ||
using namespace std; | ||
|
||
ll N, c[2005]; | ||
|
||
int main() { | ||
ios::sync_with_stdio(0); | ||
cin.tie(0), cout.tie(0); | ||
cin >> N; | ||
for (int i = 1; i <= N; i++) | ||
cin >> c[i]; | ||
for (int i = 1; i <= N; i++) | ||
{ | ||
bool found = 0; | ||
for (int j = i + 1; j <= N; j++) | ||
if(2 * c[i] <= c[j] && c[j] <= 3 * c[i]) | ||
found = 1; | ||
cout << (found ? "Yes" : "No") << " \n"[i == N]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <bits/stdc++.h> | ||
using namespace std; | ||
|
||
int N, c[300005], ans[300005]; | ||
set<int> st; | ||
|
||
int main() { | ||
ios::sync_with_stdio(0); | ||
cin.tie(0), cout.tie(0); | ||
cin >> N; | ||
for (int i = 1; i <= N; i++) | ||
cin >> c[i]; | ||
for (int i = N; i >= 1; i--) | ||
{ | ||
auto iter = st.lower_bound(2 * c[i]); | ||
if(iter != st.end()) | ||
ans[i] = (*iter <= 3 * c[i]); | ||
st.insert(c[i]); | ||
} | ||
for (int i = 1; i <= N; i++) | ||
cout << (ans[i] ? "Yes" : "No") << " \n"[i == N]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
{ | ||
"correct.cpp": { | ||
"verdict": "model_solution" | ||
}, | ||
"n2.cpp": { | ||
"verdict": "incorrect", | ||
"except": | ||
{ | ||
"samples": "correct", | ||
"n2": "correct" | ||
} | ||
}, | ||
"overflow.cpp": { | ||
"verdict": "incorrect", | ||
"except": | ||
{ | ||
"nc": "correct" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
100 | ||
291108232 714965928 971241974 470896599 380508394 339581854 772255333 718923577 496039315 862282454 611348574 370570961 602979864 325817588 979333687 687763932 762080568 81140450 338220657 112729579 52499173 982129849 952523165 302957867 538997295 881337896 584230147 855531488 597310939 303413606 186458263 814327281 666131600 527563657 524952088 161277837 97534505 210554020 295875093 538828889 14270650 794448056 16780425 214894180 481717723 979924577 422876953 299114738 350021703 106942319 527046864 935689739 932248004 818312166 293730476 197436714 205575772 605685136 207609413 781104295 93279472 289643690 279209993 989859504 815108293 787302613 500677549 951034215 628440334 727430133 54031532 613194225 371783572 772305535 728817372 603596150 926852935 352420065 994121586 394821579 112136488 429772406 895778478 813798393 648672140 727940234 796762320 30796070 515284530 360731698 637983413 392494852 774477701 515672508 60275833 519502599 934593199 390133216 369700686 680103620 | ||
1390582628 1037539632 1408493187 911359698 1313266276 456527534 1081130502 1727607660 1759706062 596606574 1433033273 911533713 561424477 503239842 849615477 1403820609 59745109 17305685 1305166556 1521267306 1203843912 1010670998 1811027868 1047171109 1190841992 1137055124 662017349 682493283 926285335 581442934 639111337 797159008 1341205644 1004935227 572136294 338425342 309393645 1439689731 824365482 808151796 1921490143 1433422716 1523649303 1773865026 937196697 886459975 1642581172 454562414 29039745 917658668 898716106 953430834 408750256 171721159 1492503349 838967835 341864821 158256799 82899273 105716257 179067272 3872600 384742507 1180542149 1044278792 1917911190 609627172 501898942 125759638 1755786441 50244071 1359233039 580037181 256026259 496442324 653550051 1158045808 347618586 1274240041 1983539990 1670055181 1936970663 646353028 859035620 539578959 990148316 1419089660 1810279132 294577104 1950720790 357583664 1208312498 991886075 1978927830 455779865 954070357 1217911051 1983312207 521776332 1414195885 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Yes No No Yes Yes Yes No No Yes No No Yes No Yes No No No Yes Yes Yes Yes No No Yes No No No No No Yes Yes No No No No Yes Yes Yes Yes No Yes No No Yes Yes No Yes Yes Yes Yes No No No No Yes Yes Yes No Yes No Yes Yes Yes No No No No No No No Yes No Yes No No No No Yes No Yes No Yes No No No No No No No Yes No Yes No No No No No No No No | ||
No No No Yes No Yes No No No Yes No Yes Yes Yes Yes No Yes Yes No No No No No No No No Yes Yes Yes Yes Yes Yes No No Yes Yes Yes No Yes Yes No No No No Yes Yes No Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes No Yes No No No Yes Yes Yes No No No Yes Yes Yes Yes No Yes No No No No Yes Yes Yes Yes No No No No Yes No No No Yes Yes No No Yes No |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.