QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#784558#9792. Ogre Sortucup-team4975#WA 0ms3596kbC++231.3kb2024-11-26 15:20:412024-11-26 15:20:41

Judging History

This is the latest submission verdict.

  • [2024-11-26 15:20:41]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3596kb
  • [2024-11-26 15:20:41]
  • Submitted

answer

#define LOCAL
#include <bits/stdc++.h>
#define fir first
#define sec second
#define el '\n'

#ifdef LOCAL
#define FINISH cerr << "FINISH" << endl;
#else
#define FINISH ;
#endif

#ifdef LOCAL
#define debug(x) cerr << setw(4) << #x << " == " << x << endl
#else
#define debug(x)
#endif

#ifdef LOCAL
#define debugv(x)                   \
    cerr << setw(4) << #x << ":: "; \
    for (auto i : x)                \
        cerr << i << " ";           \
    cerr << endl
#else
#define debugv(x)
#endif

using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
ostream& operator<<(ostream& out, PII& x)
{
    out << x.fir << " " << x.sec << endl;
    return out;
}

const int mod = 998244353;
const int inf = 0x3f3f3f3f;
const int N = 200020;
void solve()
{
    int n;
    cin >> n;
    vector<int> a(n + 1, 0);
    for (int i = 1 ;i <= n; i++) {
    	cin >> a[i];
    }
    int tmp = n;
    for (int i = n; i >= 1; i--) {
    	if (a[i] == tmp) {
    		tmp--;
    	}
    }
    cout << tmp << " " << tmp << el;
    for (int i = tmp; i >= 1; i--) {
    	cout << i << " 1" << el;
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int T = 1;
    // cin >> T;
    while (T--) {
        solve();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3596kb

input:

4
1 2 4 3

output:

3 3
3 1
2 1
1 1

result:

wrong answer participant used a nop move