Submission #646031

# Submission time Handle Problem Language Result Execution time Memory
646031 2022-09-28T14:02:34 Z Tenis0206 Strange Device (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)
      |              ^~
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -