답안 #1099328

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1099328 2024-10-11T07:40:59 Z dmn223 Infinite Race (EGOI24_infiniterace2) C++17
0 / 100
85 ms 10864 KB
#include <bits/stdc++.h>
using namespace std;
map<int,int>m;
int n, q, x, r;
bool a[200001], b[200001];
int main()
{
    cin >> n >> q;
    while(q--)
    {
        cin >> x;
        if(x > 0)
        {
            m[x]++;
            if(m[x] > 1) r++;
        }
        if(x < 0)
        {
            x = -x;
            if(m[x]) r++;
            m[x]--;
        }
    }
    cout << r;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 504 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 18 ms 804 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 85 ms 10864 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 19 ms 808 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 352 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Incorrect 0 ms 504 KB Output isn't correct
3 Halted 0 ms 0 KB -