Compile Error
foo.cc: In function 'int main()':
foo.cc:10:24: error: 'first' was not declared in this scope
10 | cin >> first; cin >> second;
| ^~~~~
foo.cc:10:38: error: 'second' was not declared in this scope
10 | cin >> first; cin >> second;
| ^~~~~~
Code
using namespace std;
#include <bits/stdc++.h>
int main()
{
int n;
cin >> n;
vector<pair<int, int>>input(n);
for (int i = 0; i < n; i++){
int x, y;
cin >> first; cin >> second;
cout << (x == 1 || y == 1 ? -1: 1) << endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1235 A. Valid Integer
- Contest
- Happy New Year 2026
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2026-01-06 14:48:21
- Judged At
- 2026-01-06 14:48:21
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes