| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 28080 | tlwpdus 팬클럽 회장 (#71) | The Ant and The Bitcoin (FXCUP2_ant) | C++14 | 0 ms | 2800 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, k;
ll l, t, x[100010], bx;
int main(){
	scanf("%d%lld%lld", &n, &l, &t);
	for(int i = 1; i <= n; i++){
		char buf[3]; ll cx;
		scanf("%lld%s", &cx, buf);
		if(buf[0] == 'R') cx += t;
		else cx += 2 * t * l - t;
		cx %= 2 * l;
		if(cx > l) cx = 2 * l - cx;
		x[i] = cx;
	}
	scanf("%d", &k);
	bx = x[k];
	sort(x + 1, x + n + 1);
	printf("%d\n", int(lower_bound(x + 1, x + n + 1, bx) - x));
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
