Habijabi Team 5 march
kaziamir
c_cpp
a year ago
1.2 kB
3
Indexable
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #include<functional> using namespace __gnu_pbds; using namespace std; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; typedef pair<int,int> pi; #define int unsigned long long #define endl "\n" void oj(){ #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt","w", stdout); #endif } void solution(){ } int32_t main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); oj(); int ct = 1; while(true){ int n; cin>>n; cout<<n<<"Hell0"<<endl; if(n==0){ cout<<"ber hoilam\n"; break; } string s; vector<string> fst, sec; for(int i = 0; i<n ; i++){ cin>>s; if(i&1){ sec.push_back(s); } else{ fst.push_back(s); } } cout<<"SET "<< ct<<endl; for(int i = 0; i<fst.size(); i++){ cout<<fst[i]<<endl; } for(int i = sec.size()-1; i>=0; i--){ cout<<sec[i]<<endl; } ct++; } }
Editor is loading...
Leave a Comment