티스토리 뷰
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
mt19937 rng(chrono::high_resolution_clock().now().time_since_epoch().count());
ll rand(ll l, ll r) { return uniform_int_distribution<ll>(l, r)(rng); }
void compile()
{
system("g++ -std=c++17 -O2 -o PROBLEM grader.cpp PROBLEM.cpp");
system("g++ -std=c++17 -O2 -o PROBLEM2 grader.cpp PROBLEM2.cpp");
}
void input()
{
FILE *in=fopen("in", "w");
fclose(in);
}
vector<char> read(char *S)
{
FILE *out=fopen(S, "r");
char c; vector<char> V;
c=getc(out);
while(c!=EOF)
{
V.push_back(c);
c=getc(out);
}
fclose(out);
return V;
}
bool run()
{
system("./PROBLEM <in >out");
system("./PROBLEM2 <in >out2");
return read("out")==read("out2");
}
int main()
{
compile();
for(int tc=1; ; tc++)
{
printf("TC %d\n", tc);
input();
if(!run()) break;
}
}
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Centroid Decomposition
- Interactive
- Segment Tree
- tree
- Sqrt Decomposition
- Line sweeping
- Floyd-Warshall
- Sparse Table
- Shortest path
- HLD
- Fenwick Tree
- Union Find
- graph
- DP
- Parametric Search
- stack
- Greedy
- Codeforces
- APIO
- BOJ
- DFS
- Persistent Segment Tree
- convex hull
- ioi
- Lazy Propagation
- CHT
- offline
- Divide & Conquer
- Merge Sort
- ⭐
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함