Submission #890391
Source Code Expand
#include <fstream> #include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <sstream> #include <map> #include <set> #include <vector> #include <cmath> #include <queue> #include <random> using namespace std; #define min(a,b) ((a)<(b) ? (a):(b)) #define max(a,b) ((a)>(b) ? (a):(b)) long long gcd(long long a, long long b){ if(a<b){ swap(a,b); } while(b){ long long r = a%b; a=b; b=r; } return a; } int lcm(int a, int b){ return (a*b)/gcd(a,b); } int isPrim(int a){ if(a==1){ return 0; } for(int i=2;i<=(a+1)/2;i++){ if(a%i==0){ return 0; } } return 1; } long long mod_pow(long long x, long long n, long long mod){ //xのn乗を計算するのにn乗を2進表記にして計算 //x^22 = x^16 + x^4 + x^2 long long ret=1; while(n>0){ if(n%2==1){ ret=(ret*x)%mod;//答えに付加 } x=(x*x)%mod;//2乗 n=n/2; } return ret; } struct XX{ int d=0; int a=0; int k=0; int t=0; }; class xxIntu { public: bool operator()(const XX& riLeft, const XX& riRight) const { //第2条件 if((riLeft.a+riLeft.k) == (riRight.a+riRight.k)){ return riLeft.a < riRight.a;//<:昇順(小さいものから順番)、>:降順(大きいものから順番) } //第1条件 return (riLeft.a+riLeft.k) < (riRight.a+riRight.k); } }; /*bool operator< (const XX &riLeft, const XX &riRight){ return riLeft.d < riRight.d; };*/ int main(int argc, const char * argv[]) { //std::ios::sync_with_stdio(false); //scanf("%s",S); //scanf("%d",&N); //getline(cin, target); //cin >> x >> y; //テスト用 //ifstream ifs( "1_06.txt" ); //ifs >> a; //ここから string s; cin >> s; cout << s.substr(0,4)+" "+ s.substr(4,s.size())<< endl; //ここまで //cout << "ans" << endl;改行含む //printf("%.0f\n",ans);//小数点以下表示なし //printf("%.7f\n",p); //printf("%f\n",pow(2,ans.size())); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - CODEFESTIVAL 2016 |
User | ikeha |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 2307 Byte |
Status | AC |
Exec Time | 3 ms |
Memory | 384 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 3 ms | 256 KB |
0_01.txt | AC | 3 ms | 384 KB |
0_02.txt | AC | 3 ms | 256 KB |
1_00.txt | AC | 3 ms | 384 KB |
1_01.txt | AC | 3 ms | 256 KB |
1_02.txt | AC | 3 ms | 256 KB |