Submission #132159
Source Code Expand
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <set>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <iomanip>
#include <iterator>
#include <vector>
#include <limits>
#include <stack>
#include <queue>
#include <deque>
#include <typeinfo>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <cfloat>
#include <cassert>
#include <cmath>
#include <cctype>
#include <ctime>
#include <sstream>
#include <bitset>
#define reb(i,b,n) for(int i=(int)(b); i<(int)(n); i++)
#define rep(i,n) reb(i,0,n)
#define rer(i,n) for(int i=1; i<=n; i++)
#define rrep(i,n) for(int i = n-1; i >= 0; i--)
#define rreb(i,n,b) for(int i = n; i >= b; i--)
#define resz(i,v) rep(i,sz(v))
#define let(v, x) __typeof(x) v = (x)
#define each(it,v) for(let(it, (v).begin()); it!=(v).end(); it++)
#define reach(it,v) for(let(it, (v).rbegin());i!=(v).rend();i++)
#define priArr(table, n) rep(i,n){cout<<table[i]<<' ';}cout<<'\n';
#define priAr2(table,W,H) rep(y,H){rep(x,W)cout<<table[y][x]<<' ';cout<<'\n';}
#define vall(x) (x).begin(), (x).end()
#define rvall(x) (x).rbegin(), (x).rend()
#define vsort(v) sort(vall(v))
#define rvsort(v) sort(rvall(v))
#define len(array) (sizeof (array) / sizeof *(array))
#define aall(x) x, x+len(x)
#define asort(x) sort(aall(x))
#define rasort(a, type) sort(aall(a), greater<type>())
#define afill(a, v) fill(aall(a), v)
#define afill2(a, v, type) fill((type *)a, (type *)(a + len(a)), v)
#define sz(x) (int)(x).size()
#define mp(a, b) make_pair(a, b)
#define dmax(x,y) x = max(x,y);
#define dmin(x,y) x = min(x,y);
#define dadd(x,y) x = (x+(y))%MOD;
#define ddel(x,y) x = (x-(y)+MOD)%MOD;
#define dmul(x,y) x = ((ll)x*(y))%MOD;
#define snuke srand((unsigned)clock()+(unsigned)time(NULL))
#define fi first
#define se second
#define pb push_back
#define _USE_MATH_DEFINES
using std::stringstream;
using namespace std;
typedef long long ll; typedef unsigned long long ull;
typedef pair <int, int> P; typedef pair <int, P> PP;
typedef vector<int> vi;typedef vector<vi> vvi;typedef vector<string> vs;
typedef vector<ll> vl; typedef vector<P > vP; typedef vector<char> vc;
typedef long double ld;
const static int INF = 0x3f3f3f3f;
const static ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const static double EPS = 1e-9;
const static ll MOD = 1000000007LL;
inline int toInt(std::string s) {int v; std::istringstream sin(s);sin>>v;return v;}
template<class T> inline std::string toString(T x) {std::ostringstream sout;sout<<x;return sout.str();}
int dx[] = {1,0,-1,0}, dy[] = {0,1,0,-1};
/* --------------------------------------------------------------- */
int card[6];
int main(int argc, char *argv[])
{
ios::sync_with_stdio(false);
cin.tie(0); // off the synchronous of cin and cout
int card[6];
rep(i, 6) {
card[i]= i+1;
}
int n;
while (cin >> n) {
rep(i, n) {
int tmp;
tmp = card[i%5];
card[i%5] = card[i%5+1];
card[i%5+1] = tmp;
}
rep(i, 6) {
cout << card[i];
}cout << '\n';
}
return 0;
}
Submission Info
Submission Time |
|
Task |
C - 入れ替え |
User |
emacs |
Language |
C++ (G++ 4.6.4) |
Score |
30 |
Code Size |
3299 Byte |
Status |
TLE |
Exec Time |
2032 ms |
Memory |
944 KB |
Judge Result
Set Name |
Subtask1 |
Subtask2 |
Score / Max Score |
30 / 30 |
0 / 70 |
Status |
|
|
Set Name |
Test Cases |
Subtask1 |
SubTask1/00_sample_00.txt, SubTask1/00_sample_01.txt, SubTask1/00_sample_02.txt, SubTask1/rand_19.txt, SubTask1/rand_2.txt, SubTask1/rand_25.txt, SubTask1/rand_27.txt, SubTask1/rand_33.txt, SubTask1/rand_35.txt, SubTask1/rand_4.txt, SubTask1/rand_44.txt, SubTask1/rand_48.txt, SubTask1/rand_8.txt |
Subtask2 |
SubTask2/00_sample_03.txt, SubTask2/max_case.txt, SubTask2/rand_120009641.txt, SubTask2/rand_134230520.txt, SubTask2/rand_136939465.txt, SubTask2/rand_200732473.txt, SubTask2/rand_211796835.txt, SubTask2/rand_312330341.txt, SubTask2/rand_377341731.txt, SubTask2/rand_384611280.txt, SubTask2/rand_386098102.txt, SubTask2/rand_399010727.txt, SubTask2/rand_409627453.txt, SubTask2/rand_416537730.txt, SubTask2/rand_425486442.txt, SubTask2/rand_493135174.txt, SubTask2/rand_573105326.txt, SubTask2/rand_62794810.txt, SubTask2/rand_649471654.txt, SubTask2/rand_693017484.txt, SubTask2/rand_729197057.txt, SubTask2/rand_759630883.txt, SubTask2/rand_823752210.txt, SubTask2/rand_830399384.txt, SubTask2/rand_893242387.txt, SubTask2/rand_935005824.txt, SubTask2/rand_989703310.txt |
Case Name |
Status |
Exec Time |
Memory |
SubTask1/00_sample_00.txt |
AC |
38 ms |
796 KB |
SubTask1/00_sample_01.txt |
AC |
21 ms |
924 KB |
SubTask1/00_sample_02.txt |
AC |
21 ms |
924 KB |
SubTask1/rand_19.txt |
AC |
23 ms |
924 KB |
SubTask1/rand_2.txt |
AC |
23 ms |
928 KB |
SubTask1/rand_25.txt |
AC |
24 ms |
796 KB |
SubTask1/rand_27.txt |
AC |
22 ms |
736 KB |
SubTask1/rand_33.txt |
AC |
23 ms |
920 KB |
SubTask1/rand_35.txt |
AC |
22 ms |
928 KB |
SubTask1/rand_4.txt |
AC |
23 ms |
924 KB |
SubTask1/rand_44.txt |
AC |
21 ms |
848 KB |
SubTask1/rand_48.txt |
AC |
23 ms |
928 KB |
SubTask1/rand_8.txt |
AC |
21 ms |
924 KB |
SubTask2/00_sample_03.txt |
AC |
355 ms |
944 KB |
SubTask2/max_case.txt |
TLE |
2032 ms |
924 KB |
SubTask2/rand_120009641.txt |
AC |
424 ms |
944 KB |
SubTask2/rand_134230520.txt |
AC |
468 ms |
944 KB |
SubTask2/rand_136939465.txt |
AC |
477 ms |
916 KB |
SubTask2/rand_200732473.txt |
AC |
686 ms |
912 KB |
SubTask2/rand_211796835.txt |
AC |
725 ms |
944 KB |
SubTask2/rand_312330341.txt |
AC |
1058 ms |
928 KB |
SubTask2/rand_377341731.txt |
AC |
1275 ms |
944 KB |
SubTask2/rand_384611280.txt |
AC |
1298 ms |
864 KB |
SubTask2/rand_386098102.txt |
AC |
1304 ms |
940 KB |
SubTask2/rand_399010727.txt |
AC |
1350 ms |
736 KB |
SubTask2/rand_409627453.txt |
AC |
1380 ms |
944 KB |
SubTask2/rand_416537730.txt |
AC |
1404 ms |
912 KB |
SubTask2/rand_425486442.txt |
AC |
1432 ms |
916 KB |
SubTask2/rand_493135174.txt |
AC |
1661 ms |
944 KB |
SubTask2/rand_573105326.txt |
AC |
1924 ms |
940 KB |
SubTask2/rand_62794810.txt |
AC |
234 ms |
888 KB |
SubTask2/rand_649471654.txt |
TLE |
2030 ms |
920 KB |
SubTask2/rand_693017484.txt |
TLE |
2031 ms |
852 KB |
SubTask2/rand_729197057.txt |
TLE |
2031 ms |
920 KB |
SubTask2/rand_759630883.txt |
TLE |
2031 ms |
924 KB |
SubTask2/rand_823752210.txt |
TLE |
2030 ms |
928 KB |
SubTask2/rand_830399384.txt |
TLE |
2031 ms |
884 KB |
SubTask2/rand_893242387.txt |
TLE |
2030 ms |
916 KB |
SubTask2/rand_935005824.txt |
TLE |
2031 ms |
920 KB |
SubTask2/rand_989703310.txt |
TLE |
2032 ms |
880 KB |