0_0_20614694_25692.cpp:13:25: error: stray '#' in program
using namespace std;#define N 300005#define NMAX 2000000000 typedef long long ll; int a[22];bool cmp(const int& x, const int& y){ return x>y;} int main(){ int T, n, m; while ( scanf("%d", &T) != EOF){ while ( T > 0 ){ T--; scanf("%d", &n); int index = -1; for ( int i = 0 ;i < n; i++ ){ scanf("%d", &a[i]); } int ans = 0, t = n - 1, cur = n; while ( t >= 0 ){ if ( a[t] == cur ) cur--; t--; } cout << cur << endl; } } return 0;}
^
0_0_20614694_25692.cpp:13:41: error: stray '#' in program
using namespace std;#define N 300005#define NMAX 2000000000 typedef long long ll; int a[22];bool cmp(const int& x, const int& y){ return x>y;} int main(){ int T, n, m; while ( scanf("%d", &T) != EOF){ while ( T > 0 ){ T--; scanf("%d", &n); int index = -1; for ( int i = 0 ;i < n; i++ ){ scanf("%d", &a[i]); } int ans = 0, t = n - 1, cur = n; while ( t >= 0 ){ if ( a[t] == cur ) cur--; t--; } cout << cur << endl; } } return 0;}
^
0_0_20614694_25692.cpp:13:26: error: 'define' does not name a type
using namespace std;#define N 300005#define NMAX 2000000000 typedef long long ll; int a[22];bool cmp(const int& x, const int& y){ return x>y;} int main(){ int T, n, m; while ( scanf("%d", &T) != EOF){ while ( T > 0 ){ T--; scanf("%d", &n); int index = -1; for ( int i = 0 ;i < n; i++ ){ scanf("%d", &a[i]); } int ans = 0, t = n - 1, cur = n; while ( t >= 0 ){ if ( a[t] == cur ) cur--; t--; } cout << cur << endl; } } return 0;}
^
|