This file contains hidden or 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
| ''' | |
| Requirements for contest.json | |
| { | |
| "name": "Contest name" | |
| "base_url": "https://qoj.ac/contest/", | |
| "problems": "ABCDEFGHIJKLM", | |
| "offset": 9405, | |
| "user_agent": "User Agent", | |
| "cookie": "UOJSESSID=Your QOJ SESSID" |
This file contains hidden or 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
| import sys | |
| import uuid | |
| import subprocess | |
| from pathlib import Path | |
| TEMPLATE = ''' | |
| #let filename = "%s" | |
| #let fit(name: "", width: 100mm) = { | |
| context { |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define int long long | |
| const int P = 1e9+7, INV2 = (P+1) / 2; | |
| #define pb push_back | |
| template<typename T> | |
| using v = vector<T>; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define int long long | |
| const int P = 1e9+7; | |
| #define pb push_back | |
| template<typename T> | |
| using v = vector<T>; | |
| void solve() { |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define int long long | |
| #define pb push_back | |
| template<typename T> | |
| using v = vector<T>; | |
| const int INF = 1e18; | |
| using PII = pair<int, int>; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define int long long | |
| #define pb push_back | |
| template<typename T> | |
| using v = vector<T>; | |
| void solve() { | |
| int n, m; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define pb push_back | |
| int qry(const string& s, int i, int j) { | |
| cout << s << ' ' << i << ' ' << j << '\n'; | |
| cout.flush(); | |
| int ans; | |
| cin >> ans; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| template<typename T> | |
| using v = vector<T>; | |
| #define pb push_back | |
| void solve() { | |
| int n; | |
| cin >> n; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define int long long | |
| #define pb push_back | |
| using PII = pair<int, int>; | |
| const int INF = 1e18; | |
| const int N = 1010; | |
| int n, m, L, s, t; | |
| vector<PII> G[N]; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| using i64 = long long; | |
| i64 dfs(i64 a, i64 b, i64 c) { | |
| i64 m = max({a, b, c}); | |
| if (m == a || m == c) return 3 * m; | |
| return max({ |
NewerOlder