Submission #1636517
Source Code Expand
#include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++) #define rng(a) a.begin(),a.end() #define maxs(x,y) x = max(x,y) #define mins(x,y) x = min(x,y) #define pb push_back #define sz(x) (int)(x).size() #define pcnt __builtin_popcount #define uni(x) x.erase(unique(rng(x)),x.end()) #define snuke srand((unsigned)clock()+(unsigned)time(NULL)); #define df(x) int x = in() #define dame { puts("-1"); return 0;} #define show(x) cout<<#x<<" = "<<x<<endl; #define PQ(T) priority_queue<T,vector<T>,greater<T> > #define bn(x) ((1<<x)-1) #define newline puts("") #define v(T) vector<T> #define vv(T) vector<vector<T>> using namespace std; typedef long long int ll; typedef unsigned uint; typedef unsigned long long ull; typedef pair<int,int> P; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vl; typedef vector<P> vp; inline int in() { int x; scanf("%d",&x); return x;} inline void priv(vi a) { rep(i,sz(a)) printf("%d%c",a[i],i==sz(a)-1?'\n':' ');} template<typename T>istream& operator>>(istream&i,vector<T>&v) {rep(j,sz(v))i>>v[j];return i;} template<typename T>string join(const vector<T>&v) {stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);} template<typename T>ostream& operator<<(ostream&o,const vector<T>&v) {if(sz(v))o<<join(v);return o;} template<typename T1,typename T2>istream& operator>>(istream&i,pair<T1,T2>&v) {return i>>v.fi>>v.se;} template<typename T1,typename T2>ostream& operator<<(ostream&o,const pair<T1,T2>&v) {return o<<v.fi<<","<<v.se;} const int MX = 200005, INF = 1001001001; const ll LINF = 1e18; const double eps = 1e-10; typedef v(string) vs; int main() { multiset<string> s; rep(i,3) { int n; scanf("%d",&n); rep(j,n) s.insert(string(1,'a'+i)); } while (sz(s) > 1) { auto it = s.end(); --it; string x = *(s.begin()) + *it; s.erase(it); s.erase(s.begin()); s.insert(x); } cout<<*(s.begin())<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | F - Largest Smallest Cyclic Shift |
User | snuke |
Language | C++14 (GCC 5.4.1) |
Score | 1600 |
Code Size | 2295 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:56:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 1600 / 1600 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt, example1.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 031.txt, 032.txt, 033.txt, 034.txt, 035.txt, 036.txt, 037.txt, 038.txt, 039.txt, 040.txt, 041.txt, 042.txt, 043.txt, 044.txt, 045.txt, 046.txt, 047.txt, 048.txt, 049.txt, 050.txt, 051.txt, 052.txt, 053.txt, 054.txt, 055.txt, 056.txt, 057.txt, 058.txt, 059.txt, 060.txt, 061.txt, 062.txt, 063.txt, 064.txt, 065.txt, 066.txt, 067.txt, 068.txt, 069.txt, 070.txt, 071.txt, 072.txt, 073.txt, 074.txt, 075.txt, 076.txt, 077.txt, 078.txt, 079.txt, 080.txt, 081.txt, 082.txt, 083.txt, 084.txt, 085.txt, 086.txt, 087.txt, 088.txt, 089.txt, 090.txt, 091.txt, 092.txt, 093.txt, 094.txt, 095.txt, 096.txt, 097.txt, 098.txt, 099.txt, 100.txt, 101.txt, 102.txt, 103.txt, 104.txt, 105.txt, 106.txt, 107.txt, 108.txt, 109.txt, 110.txt, 111.txt, example0.txt, example1.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 1 ms | 256 KB |
001.txt | AC | 1 ms | 256 KB |
002.txt | AC | 1 ms | 256 KB |
003.txt | AC | 1 ms | 256 KB |
004.txt | AC | 1 ms | 256 KB |
005.txt | AC | 1 ms | 256 KB |
006.txt | AC | 1 ms | 256 KB |
007.txt | AC | 1 ms | 256 KB |
008.txt | AC | 1 ms | 256 KB |
009.txt | AC | 1 ms | 256 KB |
010.txt | AC | 1 ms | 256 KB |
011.txt | AC | 1 ms | 256 KB |
012.txt | AC | 1 ms | 256 KB |
013.txt | AC | 1 ms | 256 KB |
014.txt | AC | 1 ms | 256 KB |
015.txt | AC | 1 ms | 256 KB |
016.txt | AC | 1 ms | 256 KB |
017.txt | AC | 1 ms | 256 KB |
018.txt | AC | 1 ms | 256 KB |
019.txt | AC | 1 ms | 256 KB |
020.txt | AC | 1 ms | 256 KB |
021.txt | AC | 1 ms | 256 KB |
022.txt | AC | 1 ms | 256 KB |
023.txt | AC | 1 ms | 256 KB |
024.txt | AC | 1 ms | 256 KB |
025.txt | AC | 1 ms | 256 KB |
026.txt | AC | 1 ms | 256 KB |
027.txt | AC | 1 ms | 256 KB |
028.txt | AC | 1 ms | 256 KB |
029.txt | AC | 1 ms | 256 KB |
030.txt | AC | 1 ms | 256 KB |
031.txt | AC | 1 ms | 256 KB |
032.txt | AC | 1 ms | 256 KB |
033.txt | AC | 1 ms | 256 KB |
034.txt | AC | 1 ms | 256 KB |
035.txt | AC | 1 ms | 256 KB |
036.txt | AC | 1 ms | 256 KB |
037.txt | AC | 1 ms | 256 KB |
038.txt | AC | 1 ms | 256 KB |
039.txt | AC | 1 ms | 256 KB |
040.txt | AC | 1 ms | 256 KB |
041.txt | AC | 1 ms | 256 KB |
042.txt | AC | 1 ms | 256 KB |
043.txt | AC | 1 ms | 256 KB |
044.txt | AC | 1 ms | 256 KB |
045.txt | AC | 1 ms | 256 KB |
046.txt | AC | 1 ms | 256 KB |
047.txt | AC | 1 ms | 256 KB |
048.txt | AC | 1 ms | 256 KB |
049.txt | AC | 1 ms | 256 KB |
050.txt | AC | 1 ms | 256 KB |
051.txt | AC | 1 ms | 256 KB |
052.txt | AC | 1 ms | 256 KB |
053.txt | AC | 1 ms | 256 KB |
054.txt | AC | 1 ms | 256 KB |
055.txt | AC | 1 ms | 256 KB |
056.txt | AC | 1 ms | 256 KB |
057.txt | AC | 1 ms | 256 KB |
058.txt | AC | 1 ms | 256 KB |
059.txt | AC | 1 ms | 256 KB |
060.txt | AC | 1 ms | 256 KB |
061.txt | AC | 1 ms | 256 KB |
062.txt | AC | 1 ms | 256 KB |
063.txt | AC | 1 ms | 256 KB |
064.txt | AC | 1 ms | 256 KB |
065.txt | AC | 1 ms | 256 KB |
066.txt | AC | 1 ms | 256 KB |
067.txt | AC | 1 ms | 256 KB |
068.txt | AC | 1 ms | 256 KB |
069.txt | AC | 1 ms | 256 KB |
070.txt | AC | 1 ms | 256 KB |
071.txt | AC | 1 ms | 256 KB |
072.txt | AC | 1 ms | 256 KB |
073.txt | AC | 1 ms | 256 KB |
074.txt | AC | 1 ms | 256 KB |
075.txt | AC | 1 ms | 256 KB |
076.txt | AC | 1 ms | 256 KB |
077.txt | AC | 1 ms | 256 KB |
078.txt | AC | 1 ms | 256 KB |
079.txt | AC | 1 ms | 256 KB |
080.txt | AC | 1 ms | 256 KB |
081.txt | AC | 1 ms | 256 KB |
082.txt | AC | 1 ms | 256 KB |
083.txt | AC | 1 ms | 256 KB |
084.txt | AC | 1 ms | 256 KB |
085.txt | AC | 1 ms | 256 KB |
086.txt | AC | 1 ms | 256 KB |
087.txt | AC | 1 ms | 256 KB |
088.txt | AC | 1 ms | 256 KB |
089.txt | AC | 1 ms | 256 KB |
090.txt | AC | 1 ms | 256 KB |
091.txt | AC | 1 ms | 256 KB |
092.txt | AC | 1 ms | 256 KB |
093.txt | AC | 1 ms | 256 KB |
094.txt | AC | 1 ms | 256 KB |
095.txt | AC | 1 ms | 256 KB |
096.txt | AC | 1 ms | 256 KB |
097.txt | AC | 1 ms | 256 KB |
098.txt | AC | 1 ms | 256 KB |
099.txt | AC | 1 ms | 256 KB |
100.txt | AC | 1 ms | 256 KB |
101.txt | AC | 1 ms | 256 KB |
102.txt | AC | 1 ms | 256 KB |
103.txt | AC | 1 ms | 256 KB |
104.txt | AC | 1 ms | 256 KB |
105.txt | AC | 1 ms | 256 KB |
106.txt | AC | 1 ms | 256 KB |
107.txt | AC | 1 ms | 256 KB |
108.txt | AC | 1 ms | 256 KB |
109.txt | AC | 1 ms | 256 KB |
110.txt | AC | 1 ms | 256 KB |
111.txt | AC | 1 ms | 256 KB |
example0.txt | AC | 1 ms | 256 KB |
example1.txt | AC | 1 ms | 256 KB |