Submission #931844

# Submission time Handle Problem Language Result Execution time Memory
931844 2024-02-22T12:25:37 Z 12345678 Strange Device (APIO19_strange_device) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

#define ll long long

const int nx=1e6+5;
ll n, a, b, l(nx), r(nx);

int main()
{
    cin.tie(NULL)->sync_with_stdio(false);
    cin>>n>>a>>b>>l[0]>>r[0];
    //for (int i=1; i<=20; i++) cout<<i<<' '<<i+(i/b)<<' '<<(i+(i/b))%a<<' '<<i%b<<'\n';
    cout<<min(a*b, r-l+1);
}

Compilation message

strange_device.cpp: In function 'int main()':
strange_device.cpp:13:20: error: invalid types 'long long int[int]' for array subscript
   13 |     cin>>n>>a>>b>>l[0]>>r[0];
      |                    ^
strange_device.cpp:13:26: error: invalid types 'long long int[int]' for array subscript
   13 |     cin>>n>>a>>b>>l[0]>>r[0];
      |                          ^