# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
28184 | 대회할수있으려나 (#71) | 개미와 비트코인 (FXCUP2_ant) | C++98 | 0 ms | 5928 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
struct info
{
int pos, idx;
char dir;
};
bool cmp1(info a, info b) {return a.pos < b.pos;}
bool cmp2(info a, info b) {return a.idx < b.idx;}
info arr[200009];
pair<int, int> res[200009];
int main()
{
int n,l,t;
scanf("%d %d %d",&n,&l,&t);
for(int i=1; i<=n; i++) {
scanf("%d %c", &arr[i].pos, &arr[i].dir);
}
sort(arr+1, arr+n+1, cmp1);
for(int i=1; i<=n; i++) arr[i].idx = i;
sort(arr+1, arr+n+1, cmp2);
for(int i=1; i<=n; i++) {
int pos = arr[i].pos;
char dir = arr[i].dir;
if(dir == 'L') pos -= t;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |