Submission #1175591


Source Code Expand

//AtCoder用
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdlib.h>
#include <stdbool.h>
#define MOD 1000000007
void input_array(int how_data,int *data);
int get_random(int min, int max);
int factorial(int n);
int fibonacci(int n);
int qsort_09(const int *sys1 , const int *sys2);
int qsort_90(const int *sys1 , const int *sys2);
int sel_max(int a , int b);
int sel_min(int a , int b);
int array_max(int how_data,int *data);
int array_min(int how_data,int *data);
int can_DP(int how_data,int *data,int how_can,bool *can);
int array_sum(int how_data,int *data);

int main(void){
    char data[4][4]={{'\0'}};
    int loop1,loop2;
    for(loop1=0;loop1<4;loop1++){
        for(loop2=0;loop2<4;loop2++){
            scanf("%c ",&data[loop1][loop2]);
        }
        scanf("\n");
    }
    for(loop1=0;loop1<4;loop1++){
        for(loop2=0;loop2<4;loop2++){
            printf("%c ",data[3-loop1][3-loop2]);
        }
        printf("\n");
    }
    return 0;
}


//how_data個の配列data[]に標準入力
//input_array(how_data,data);
void input_array(int how_data,int *data){
    int loop;
    for(loop=0;loop<how_data;loop++){
        scanf("%d",&data[loop]);
    }
    return ;
}

int get_random(int min, int max){   //指定の範囲から乱数を1つ返すやつ
    //srand((unsigned int)time(0));   //現在時刻で疑似乱数初期化
    rand();rand();rand();rand();    //乱数を空打ち
    return (rand()%(max+1-min))+min;
}


int factorial(int n){//n!のMOD10^9+7を返すやつ
    unsigned long long int ret=1;
    for(int i=1;i<=n;i++)ret=(ret*i)%1000000007;
    return (int)ret;
}

int qsort_09(const int *sys1 , const int *sys2){ //小さいのが上にくるやつ
    //qsort(data,how_data,sizeof(int),(int (*)(const void *,const void *))qsort_09);
    if(*sys1<*sys2){
        return -1;
    }else if(*sys1==*sys2){
        return 0;
    }else{
        return 1;
    }
}

int qsort_90(const int *sys1 , const int *sys2){ //大きいのが上にくるやつ
    //qsort(data,how_data,sizeof(int),(int (*)(const void *,const void *))qsort_90);
    if(*sys1<*sys2){
        return 1;
    }else if(*sys1==*sys2){
        return 0;
    }else{
        return -1;
    }
}

int fibonacci(int n){
    switch(n){
        case 0:return 0;
        case 1:return 1;
        default :return fibonacci(n-1)+fibonacci(n-2);
    }
}

int sel_max(int a,int b){
    if(a>b)return a;
    return b;
}

int sel_min(int a,int b){
    if(a>b)return b;
    return a;
}

int can_DP(int how_data,int *data,int how_can,bool *can){//Typical DP Contest A
    //data内で組み合わせられる和をcanに0 or 1で入れる
    //返り値はパターン数
    int loopA,loopB;
    int ret=0;
    for(loopA=0;loopA<how_can;loopA++){//初期化
        can[loopA]=0;
    }
    can[0]=1;//絶対にありえる
    for(loopA=0;loopA<how_data;loopA++){
        for(loopB=how_can-1;loopB>=0;loopB--){
            if(can[loopB]==1 && loopB+data[loopA]<how_can){
                can[loopB+data[loopA]]=1;
            }
        }
    }
    for(loopA=0;loopA<how_can;loopA++){
        if(can[loopA]==1){
            ret++;
        }
    }
    return ret;
}
int array_max(int how_data,int *data){
    int loop;
    int ret=data[0];
    for(loop=0;loop<how_data;loop++){
        if(ret<data[loop])ret=data[loop];
    }
    return ret;
}
int array_min(int how_data,int *data){
    int loop;
    int ret=data[0];
    for(loop=0;loop<how_data;loop++){
        if(ret>data[loop])ret=data[loop];
    }
    return ret;
}
int array_sum(int how_data,int *data){
    int ret=0;
    int loop;
    for(loop=0;loop<how_data;loop++){
        ret+=data[loop];
    }
    return ret;
}

Submission Info

Submission Time
Task B - 回転
User infer496
Language C (GCC 5.4.1)
Score 100
Code Size 3852 Byte
Status AC
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:27:13: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
             scanf("%c ",&data[loop1][loop2]);
             ^
./Main.c:29:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("\n");
         ^
./Main.c: In function ‘input_array’:
./Main.c:46:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&data[loop]);
         ^

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 30
Set Name Test Cases
All 00_sample_00.txt, 00_sample_01.txt, 01_all_dot.txt, 02_all_o.txt, 03_all_x.txt, rand_0.txt, rand_1.txt, rand_10.txt, rand_11.txt, rand_12.txt, rand_13.txt, rand_14.txt, rand_15.txt, rand_16.txt, rand_17.txt, rand_18.txt, rand_19.txt, rand_2.txt, rand_20.txt, rand_21.txt, rand_22.txt, rand_23.txt, rand_24.txt, rand_3.txt, rand_4.txt, rand_5.txt, rand_6.txt, rand_7.txt, rand_8.txt, rand_9.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 128 KB
00_sample_01.txt AC 1 ms 128 KB
01_all_dot.txt AC 1 ms 128 KB
02_all_o.txt AC 1 ms 128 KB
03_all_x.txt AC 1 ms 128 KB
rand_0.txt AC 1 ms 128 KB
rand_1.txt AC 1 ms 128 KB
rand_10.txt AC 1 ms 128 KB
rand_11.txt AC 1 ms 128 KB
rand_12.txt AC 1 ms 128 KB
rand_13.txt AC 1 ms 128 KB
rand_14.txt AC 1 ms 128 KB
rand_15.txt AC 1 ms 128 KB
rand_16.txt AC 1 ms 128 KB
rand_17.txt AC 1 ms 128 KB
rand_18.txt AC 1 ms 128 KB
rand_19.txt AC 1 ms 128 KB
rand_2.txt AC 1 ms 128 KB
rand_20.txt AC 1 ms 128 KB
rand_21.txt AC 1 ms 128 KB
rand_22.txt AC 1 ms 128 KB
rand_23.txt AC 1 ms 128 KB
rand_24.txt AC 1 ms 128 KB
rand_3.txt AC 1 ms 128 KB
rand_4.txt AC 1 ms 128 KB
rand_5.txt AC 1 ms 128 KB
rand_6.txt AC 1 ms 128 KB
rand_7.txt AC 1 ms 128 KB
rand_8.txt AC 1 ms 128 KB
rand_9.txt AC 1 ms 128 KB