제출 #926311

#제출 시각아이디문제언어결과실행 시간메모리
926311TAhmed33이상한 기계 (APIO19_strange_device)C++98
10 / 100
5032 ms524288 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main () {
    ll n, a, b; cin >> n >> a >> b;
    vector <pair <ll, ll>> arr(n); for (auto &[x, y] : arr) cin >> x >> y;
    set <pair <ll, ll>> xx;
    for (auto [x, y] : arr) {
        for (ll i = x; i <= y; i++) {
            ll g = (i + (i / b)) % a, h = i % b;
            xx.insert({g, h});
        }
    }
    cout << (int)xx.size() << '\n';
}

컴파일 시 표준 에러 (stderr) 메시지

strange_device.cpp: In function 'int main()':
strange_device.cpp:6:47: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
    6 |     vector <pair <ll, ll>> arr(n); for (auto &[x, y] : arr) cin >> x >> y;
      |                                               ^
strange_device.cpp:8:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
    8 |     for (auto [x, y] : arr) {
      |               ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...