제출 #1166210

#제출 시각아이디문제언어결과실행 시간메모리
1166210SyriusStone Arranging 2 (JOI23_ho_t1)C++20
25 / 100
2095 ms1096 KiB
#include <bits/stdc++.h> using namespace std; // #define int long long #define ll long long #define ff first #define ss second #define pint pair < int , int > #define fast ios_base::sync_with_stdio(NULL); cin.tie(NULL) typedef vector < int > vint; const int inf = 1e9 + 9; const int mxn = 2e5 + 2; const int mod = 1e9 + 7; int a[mxn]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { bool found = 0; for (int j = 0; j < i; j++) { if (a[j] == a[i]) found = 1; if (found) a[j] = a[i]; } } for (int i = 0; i < n; i++) cout << a[i] << '\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...