# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
28124 | Shocking Hot (#71) | The Ant and The Bitcoin (FXCUP2_ant) | C++14 | 0 ms | 3580 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define X first
#define Y second
using namespace std;
typedef long long ll;
ll n, l, t, x;
pair<ll, ll> a[100005];
int main()
{
scanf("%lld%lld%lld",&n,&l,&t);
for(ll i=1;i<=n;i++) {
char T[2];
scanf("%lld%s",&a[i].X,T);
if(T[0] == 'L') a[i].X -= t;
else a[i].X += t;
a[i].X = (a[i].X % (2*l) + 2*l) % (2*l);
if(a[i].X >= l) a[i].X = 2*l - a[i].X;
}
scanf("%lld",&x);
a[x].Y = 1;
sort(a+1, a+1+n);
for(ll i=1;i<=n;i++) {
if(a[i].Y) {printf("%lld\n",i); return 0;}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |