AtCoder Beginner Contest 004

Submission #1768033

Source codeソースコード

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>
#include<set>
 
using namespace std;
 
#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define P(p) cout<<(p)<<endl;
#define p(p) cout<<(p)<<" ";
#define pb push_back
#define mp make_pair
#define INF 1<<25

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pi;
typedef long long ll;

//int dy[8]={1,1,1,0,0,-1,-1,-1};
//int dx[8]={-1,0,1,-1,1,-1,0,1};
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
struct S{
	int a,b,c;
};
bool asc(const S& left,const S& right){
	return left.c > right.c;
}
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	cin>>N;
	N%=30;
	vi a={1,2,3,4,5,6,};
	rep(i,N){
		swap(a[i%5],a[i%5+1]);
	}
	rep(i,6)cout<<a[i];
	cout<<endl;
	return 0;
}

Submission

Task問題 C - 入れ替え
User nameユーザ名 Zvezda
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 AC
Score得点 100
Source lengthソースコード長 1201 Byte
File nameファイル名
Exec time実行時間 1 ms
Memory usageメモリ使用量 256 KB

Test case

Set

Set name Score得点 / Max score Cases
Subtask1 30 / 30 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 70 / 70 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
SubTask1/00_sample_00.txt AC 1 ms 256 KB
SubTask1/00_sample_01.txt AC 1 ms 256 KB
SubTask1/00_sample_02.txt AC 1 ms 256 KB
SubTask1/rand_19.txt AC 1 ms 256 KB
SubTask1/rand_2.txt AC 1 ms 256 KB
SubTask1/rand_25.txt AC 1 ms 256 KB
SubTask1/rand_27.txt AC 1 ms 256 KB
SubTask1/rand_33.txt AC 1 ms 256 KB
SubTask1/rand_35.txt AC 1 ms 256 KB
SubTask1/rand_4.txt AC 1 ms 256 KB
SubTask1/rand_44.txt AC 1 ms 256 KB
SubTask1/rand_48.txt AC 1 ms 256 KB
SubTask1/rand_8.txt AC 1 ms 256 KB
SubTask2/00_sample_03.txt AC 1 ms 256 KB
SubTask2/max_case.txt AC 1 ms 256 KB
SubTask2/rand_120009641.txt AC 1 ms 256 KB
SubTask2/rand_134230520.txt AC 1 ms 256 KB
SubTask2/rand_136939465.txt AC 1 ms 256 KB
SubTask2/rand_200732473.txt AC 1 ms 256 KB
SubTask2/rand_211796835.txt AC 1 ms 256 KB
SubTask2/rand_312330341.txt AC 1 ms 256 KB
SubTask2/rand_377341731.txt AC 1 ms 256 KB
SubTask2/rand_384611280.txt AC 1 ms 256 KB
SubTask2/rand_386098102.txt AC 1 ms 256 KB
SubTask2/rand_399010727.txt AC 1 ms 256 KB
SubTask2/rand_409627453.txt AC 1 ms 256 KB
SubTask2/rand_416537730.txt AC 1 ms 256 KB
SubTask2/rand_425486442.txt AC 1 ms 256 KB
SubTask2/rand_493135174.txt AC 1 ms 256 KB
SubTask2/rand_573105326.txt AC 1 ms 256 KB
SubTask2/rand_62794810.txt AC 1 ms 256 KB
SubTask2/rand_649471654.txt AC 1 ms 256 KB
SubTask2/rand_693017484.txt AC 1 ms 256 KB
SubTask2/rand_729197057.txt AC 1 ms 256 KB
SubTask2/rand_759630883.txt AC 1 ms 256 KB
SubTask2/rand_823752210.txt AC 1 ms 256 KB
SubTask2/rand_830399384.txt AC 1 ms 256 KB
SubTask2/rand_893242387.txt AC 1 ms 256 KB
SubTask2/rand_935005824.txt AC 1 ms 256 KB
SubTask2/rand_989703310.txt AC 1 ms 256 KB