Submission #995227

# Submission time Handle Problem Language Result Execution time Memory
995227 2024-06-08T17:12:46 Z ASGA_RedSea Examination (JOI19_examination) C++17
Compilation error
0 ms 0 KB
/**

                                    * بسم الله الرحمن الرحيم *

                ﴾ رَبِّ اشْرَحْ لِي صَدْرِي * وَيَسِّرْ لِي أَمْرِي * وَاحْلُلْ عُقْدَةً مِّن لِّسَانِي * يَفْقَهُوا قَوْلِي ﴿

*/

/// author : "ASGA"

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const ll inf = 1e18;

signed main(){
    ios_base::sync_with_stdio(0);cin.tie(0);

    int n,q,x,y,z,ans;cin >> n >> q;
    vector <pair <int,int>> a(n);
    for(auto& [i,j] : a)cin >> i;
    while(q--){
        cin >> x >> y >> z;
        ans = 0;
        for(const auto& [i,j] : a)ans += (x <= i && y <= j && c <= i + j);
        cout << ans << '\n';
    }

    return 0;
}

Compilation message

examination.cpp: In function 'int main()':
examination.cpp:28:63: error: 'c' was not declared in this scope
   28 |         for(const auto& [i,j] : a)ans += (x <= i && y <= j && c <= i + j);
      |                                                               ^