제출 #1322209

#제출 시각아이디문제언어결과실행 시간메모리
1322209nurdaeeInfinite Race (EGOI24_infiniterace2)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define nur ios::sync_with_stdio(false);cin.tie(nullptr); #define all(v) v.begin(),v.end() #define int long long #define pb push_back #define vc vector const int inf = 1e18; void solve(){ int n; cin >> n; int q; cin >> q; map<int , int> mp; int cnt = 0; for(int i = 0; i < x; i++){ if( x < 0 ) mp[-x]--; else mp[x]++; if ( mp[x] > 1 ) cnt++; } cout << cnt << "\n"; } signed main() { nur int t = 1; cin >> t; while(t--) solve(); }

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

Main.cpp: In function 'void solve()':
Main.cpp:19:24: error: 'x' was not declared in this scope
   19 |     for(int i = 0; i < x; i++){
      |                        ^