|

General

# Author Problem Lang Verdict Time Memory Sent Judged
268717811 Practice:
hydro-bot1
1906E - 8 C++17 (GCC 7-32) Wrong answer on test 1 46 ms 56 KB 2024-07-04 09:14:25 2024-07-04 09:14:25
→ Source
// Hydro submission #66863dbecdde24d894d7b632@1720073663203
#include <bits/stdc++.h>
#define fi first
#define se second
#define multi false
#define gc getchar
#define pc putchar
#define pb push_back
#define int long long
#define pii pair <int, int>
#define debug(x) cout << #x << " " << x << '\n'
#define For(i, x, y) for (int i = (x); i <= (y); i++)
#define Rof(i, x, y) for (int i = (x); i >= (y); i--)
using namespace std;
inline int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
inline int lcm(int a, int b) { return a * b / gcd(a, b);}
int read (char ch = ' ', int x = 0, int w = 1) { while (!isdigit(ch)) { if (ch == '-') w = -1; ch = gc(); } while (isdigit(ch)) { x = x * 10 + (ch - '0'), ch = gc(); } return x * w; }
void read(int n, int a[]) {For (i, 1, n) a[i] = read();}
void read(int n, int a[], int b[]) {For (i, 1, n) a[i] = read(), b[i] = read();}
void write(int x) { if (x < 0) x = -x, pc('-'); if (x > 9) write(x / 10); pc(x % 10 + '0'); }
void write(int n, int a[]) {For (i, 1, n) write(a[i]), pc(' '); }
/*=============================================================================================================================================================================================*/
const int N = 2005;
int t = 1, n, cnt, x, i = 1;
int arr[N];
vector <int> V[N];
void solve() {
while (i <= 2 * n) {
x = i, cnt++;
while (arr[i] <= arr[x] && i <= n * 2) V[cnt].push_back(arr[i]), i++;
}
For (i, 1, cnt) {
for (auto i : V[i]) write(i), pc(32);
pc(10);
}
}
signed main() { if (multi) read(t); while (t--) solve(); return 0; }
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
?
?
?