답안 #646031

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
646031 2022-09-28T14:02:34 Z Tenis0206 이상한 기계 (APIO19_strange_device) C++11
0 / 100
368 ms 16844 KB
#include <bits/stdc++.h>
#define int long long

using namespace std;

int n,a,b;

vector<pair<int,int>> e;

int fr[1000005];

__int128 x;

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n>>a>>b;
    for(int i=1;i<=n;i++)
    {
        int l,r;
        cin>>l>>r;
        if(r - l + 1 >= a * b)
        {
            cout<<a * b<<'\n';
            return 0;
        }
        l %= a * b;
        r %= a * b;
        if(l <= r)
        {
            e.push_back({l,r});
        }
        else
        {
            e.push_back({0,r});
            e.push_back({l,a*b-1});
        }
    }
    sort(e.begin(),e.end());
    int rez = 0;
    for(auto it : e)
    {

    }
    cout<<rez<<'\n';
    return 0;
}

Compilation message

strange_device.cpp: In function 'int main()':
strange_device.cpp:42:14: warning: variable 'it' set but not used [-Wunused-but-set-variable]
   42 |     for(auto it : e)
      |              ^~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 4 ms 724 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Incorrect 0 ms 212 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 368 ms 16844 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 368 ms 16844 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 368 ms 16844 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 38 ms 2512 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 4 ms 724 KB Output isn't correct
3 Halted 0 ms 0 KB -