QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#109645#6506. Chase Game 32811928366Compile Error//C++23613b2023-05-30 01:24:592023-05-30 01:25:04

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-30 01:25:04]
  • 评测
  • [2023-05-30 01:24:59]
  • 提交

answer

#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
const int MAXN = 4e5 + 10;
int main() {
    long long T;
    cin >> T;
    for (long long i = 0; i < T; i++) {
        long long n;
        bool go = true;
        cin >> n;
		str[n]=i;
        vector<int>str(n);
        for (int j = 1; j <= n; j++) {
            cin >> str[j];

            if (j != 0 && abs(str[j - 1] - str[j]) >= 3) {
                go = false;
            }
        }
        if (go) {
            cout << "Yes\n";
        }
        else {
            cout << "No\n";
        }
    }
    return 0;
}

详细

answer.code: In function ‘int main()’:
answer.code:12:17: error: ‘str’ was not declared in this scope; did you mean ‘std’?
   12 |                 str[n]=i;
      |                 ^~~
      |                 std