Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
littlecube committed Sep 13, 2023
1 parent f04fae4 commit 0be71eb
Show file tree
Hide file tree
Showing 45 changed files with 119 additions and 61 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
| C. 求救訊號 | [statement](pC/statement) </br> [md](pC/statement/index.md) [pdf](pC/statement/index.pdf) | [gen](pC/gen) | [validator](pC/validator) | [solution](pC/solution) [check](pC/solutions-check.txt) | [tests](pC/tests) | [problem](pC/problem.json) </br> [solutions](pC/solutions.json) </br> [subtasks](pC/subtasks.json) | 高嘉泓
| D. 跳格子 | [statement](pD/statement) </br> [md](pD/statement/index.md) [pdf](pD/statement/index.pdf) | [gen](pD/gen) | [validator](pD/validator) | [solution](pD/solution) [check](pD/solutions-check.txt) | [tests](pD/tests) | [problem](pD/problem.json) </br> [solutions](pD/solutions.json) </br> [subtasks](pD/subtasks.json) | 高嘉泓
| E. 地震 | [statement](pE/statement) </br> [md](pE/statement/index.md) [pdf](pE/statement/index.pdf) | [gen](pE/gen) | [validator](pE/validator) | [solution](pE/solution) [check](pE/solutions-check.txt) | [tests](pE/tests) | [problem](pE/problem.json) </br> [solutions](pE/solutions.json) </br> [subtasks](pE/subtasks.json) | 高嘉泓
| F. 公園 | [statement](pF/statement) </br> [md](pF/statement/index.md) [pdf](pF/statement/index.pdf) | [gen](pF/gen) | [validator](pF/validator) | [solution](pF/solution) [check](pF/solutions-check.txt) | [tests](pF/tests) | [problem](pF/problem.json) </br> [solutions](pF/solutions.json) </br> [subtasks](pF/subtasks.json) | 高嘉泓

<!-- new problem -->

2 changes: 1 addition & 1 deletion cover.tex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
\begin{center}
\textbf{\huge 112 學年度資訊學科能力競賽臺南一中校內初選}\\
\vspace{5mm}
\textbf{\huge 112 學年度資訊學科能力競賽臺南一中校內初選\ 試題本}\\
\textbf{\huge 試題本}\\
\vspace{10mm}
\rule{17cm}{2pt}\\
\vspace{5mm}
Expand Down
Binary file modified pA/attachments/problems.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion pA/statement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ Alice 先動,並且兩個人接下來輪流移動,請你寫一個程式根

## 範例輸出
```
Bob
Alice
```
Binary file modified pA/statement/index.pdf
Binary file not shown.
28 changes: 14 additions & 14 deletions pB/gen/data
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ manual example.in
@testset small
@include samples
gen 1 0
gen 1 1000000000
gen 1 2000000000

@subtask n2
@include small
gen 100 100 a
gen 100 1000000000 b
gen 100 2000000000 b
gen 100 0
gen 2000 0
gen 2000 10000
gen 2000 10000
gen 2000 1000000000 a
gen 2000 1000000000 b
gen 2000 1000000000 c
gen 2000 1000000000 d
gen 2000 1000000000 e
gen 2000 2000000000 a
gen 2000 2000000000 b
gen 2000 2000000000 c
gen 2000 2000000000 d
gen 2000 2000000000 e

@subtask nc
@include small
Expand All @@ -33,10 +33,10 @@ gen 300000 40 d
@subtask full
@include n2
@include nc
gen 300000 1000000000 a
gen 300000 1000000000 b
gen 300000 1000000000 c
gen 300000 1000000000 d
gen 300000 1000000000 e
gen 300000 1000000000 f
gen 300000 1000000000 g
gen 300000 2000000000 a
gen 300000 2000000000 b
gen 300000 2000000000 c
gen 300000 2000000000 d
gen 300000 2000000000 e
gen 300000 2000000000 f
gen 300000 2000000000 g
21 changes: 21 additions & 0 deletions pB/solution/n2.cpp
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];
}
}
22 changes: 22 additions & 0 deletions pB/solution/overflow.cpp
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];
}
15 changes: 15 additions & 0 deletions pB/solutions.json
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"
}
}
}
2 changes: 1 addition & 1 deletion pB/statement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

## 輸入限制
- $1 \leq N \leq 3 \times 10^5$
- $0 \leq c_i \leq 10^9$
- $0 \leq c_i \leq 2 \times 10^9$

## 子任務
\subtasks
Expand Down
Binary file modified pB/statement/index.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion pB/tests/1-02.in
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
2 changes: 1 addition & 1 deletion pB/tests/1-02.out
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
2 changes: 1 addition & 1 deletion pB/tests/1-07.in

Large diffs are not rendered by default.

Loading

0 comments on commit 0be71eb

Please sign in to comment.