Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); if(a > b) puts("a > b"); else if(a < b) puts("a < b"); else puts("a == b"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244494/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244494/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if (a < b) printf("a < b\n"); else if (a > b) printf("a > b\n"); else printf("a == b\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244537/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244537/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a ,b; scanf("%d %d" ,&a ,&b); if(a < b){ printf("a < b\n"); }else if(a > b){ printf("a > b\n"); }else if(a == b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244588/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244588/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a, b; scanf( "%d %d", &a, &b ); if( a > b) printf( "a > b\n" ); else if( a < b ) printf( "a < b\n" ); else printf( "a == b\n" ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244630/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if(a > b) printf("a > b\n"); else if(a < b) printf("a < b\n"); else if(a == b) printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244674/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244674/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF){ if(a>b) printf("a > b\n"); if(a<b) printf("a < b\n"); if(a==b) printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244717/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244717/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b; scanf("%d",&a); scanf("%d",&b); if(a<b) puts("a < b"); else if(a>b) puts("a > b"); else puts("a == b"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244768/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244768/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); if(a < b){ printf("a < b\n"); } else if(a == b){ printf("a == b\n"); }else{ printf("a > b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244810/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244810/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void) { int a, b; char buf[256], rel[3]; rel[2] = '\0'; fgets(buf, 256, stdin); buf[255] = '\0'; sscanf(buf, "%d %d", &a, &b); a = a - b; if (a) { if (a & 0x80000000) rel[0] = '<'; else rel[0] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244861/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244861/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> int main(){ int a, b; scanf("%d%d", &a, &b); if ( a < b) { printf("a < b\n"); } else if (a > b){ printf("a > b\n"); } else if (a == b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244911/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244911/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a,b; scanf("%d%d",&a,&b); if(a<b)printf("a < b\n"); else if(a>b)printf("a > b\n"); else printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244955/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244955/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a, b; scanf("%d %d",&a,&b); if(a < b){ printf("a < b\n"); } if(a > b){ printf("a > b\n"); } if(a == b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245004/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a,b; scanf("%d %d",&a,&b); if (a<b) printf("a < b\n"); else if (a>b) printf("a > b\n"); else if (a==b) printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); if(a == b){ printf("a == b\n"); }else if(a > b){ printf("a > b\n"); }else{ printf("a < b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245105/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245105/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/*氏名:保坂優介, 学籍番号:200441141 概要:二つの数の大小を判別する*/ #include<stdio.h> int main(void) { int a, b; //変数の宣言 scanf("%d %d", &a, &b); //入力 if (a < b) //a<bの場合 { printf("a < b\n"); //出力 } if (a > b) //a>bの場合 { printf("a > b\n"); //出力 } if (a ==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245149/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245149/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a, b; scanf("%d%d", &a, &b); if (a < b) printf("a < b\n"); else if (a > b) printf("a > b\n"); else printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245192/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void) { int a, b; scanf("%d %d",&a,&b); if(a<b) printf("a < b\n"); else if(a==b) printf("a == b\n"); else printf("a > b\n"); return EXIT_SUCCESS; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245235/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245235/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a = 0; int b = 0; scanf("%d%d",&a,&b); if(a < b){ printf("a < b\n"); } if(a > b){ printf("a > b\n"); } if(a == b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245279/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245279/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a, b; //Value a, b. scanf("%d %d", &a, &b); printf("a "); if(a < b) printf("< "); if(a > b) printf("> "); if(a == b) printf("== "); printf("b\n"); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245321/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int a, b; scanf("%d%d", &a, &b); if (a < b) printf("a < b\n"); else if (a > b) printf("a > b\n"); else printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245365/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a=0; int b=0; scanf("%d %d",&a,&b); if(a<b){ puts("a < b"); }else if(a>b){ puts("a > b"); }else if(a==b){ puts("a == b"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include "stdio.h" int main(void) { int a,b; scanf("%d %d",&a,&b); if(a > b){ printf("a > b\n"); }else if(a < b){ printf("a < b\n"); }else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, const char * argv[]) { int a, b; scanf("%d %d", &a, &b); if (a<b) { printf("a < b\n"); }else if (a>b) { printf("a > b\n"); }else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); if (a < b){ printf("a < b\n"); } else if(a ==b){ printf("a == b\n"); } else { printf("a > b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245545/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245545/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a, b; scanf("%d %d", &a, &b); if(a<b){ printf("a < b\n"); } else if(a>b){ printf("a > b\n"); } else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245602/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if (a>b) { printf("a > b\n"); } else if (a<b) { printf("a < b\n"); } else { printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245697/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245697/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main() { long int a,b,x,y; int t; scanf("%d",&t); while(t) { scanf("%ld%ld%ld%ld",&x,&y,&a,&b); if((y-x)%(a+b)==0) printf("%ld\n",(y-x)/(a+b)); else printf("-1\n"); t--; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24574/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24574/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if(a<b){ printf("a < b\n"); }else if(a==b){ printf("a == b\n"); }else{ printf("a > b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(){ int a,b; scanf("%d%d",&a,&b); if(a<b) printf("a < b\n"); else if(a>b) printf("a > b\n"); else printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245826/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int n; scanf("%d",&n); while(n--) { int x,y,a,b; scanf("%d%d%d%d",&x,&y,&a,&b); if((y-x)%(a+b)!=0)printf("-1\n"); else printf("%d\n",(y-x)/(a+b)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24587/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define MAX 12 #define MAX_ORDER 16777216 char dec[MAX_ORDER][MAX]; int getChar_ID(char c){ if(c == 'A'){ return 1; }else if(c == 'C'){ return 2; }else if(c == 'G'){ return 3; }else if(c == 'T'){ return 4; }else re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245927/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dec = dso_local global [16...
#include<stdio.h> #include<string.h> /* Dictionary (Hash) 2019. 4/30 */ #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; // char to int int getChar(char ch) { switch (ch) { case 'A': return 1; break; case 'C': return 2; break; c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_245970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_245970/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1046...
#include<stdio.h> #include<string.h> #define M 2000000 #define L 14 char H[M][L]; int getChar( char ch ) { if( ch == 'A') { return 1; } else if( ch == 'C') { return 2; } else if( ch == 'G') { return 3; } else if( ch == 'T') { return 4; } else { return 0; } } long long getKey( char str[] ) { long lo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246012/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [2000...
#include<stdio.h> #include<string.h> #define M 1000003 #define L 14 char H[M][L]; int getChar(char ch) { if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else if ( ch == 'T') return 4; return 0; } // convert a string into an integer value long long getKey(char str[]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246056/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1000...
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #include<limits.h> typedef struct { int q; int p; }elem; elem buy[1005],sell[1005]; int a[1005][2]; int max(int a,int b) { if(a>b) return a; else return b; } int min(int a,int b) { if(a<b) return a; else r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.elem = type { i32, i32 ...
#include<stdio.h> #include<string.h> #define M 20000000 /* your task*/ #define L 14 char H[M][L]; /* Hash Table */ int getChar(char ch){ if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else return 4; } /* convert a string into an integer value */ long long getKey(char...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246142/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [2000...
#include<stdio.h> #include<string.h> #define N 100000000 char c[14]; int x[N]; int n; int a(void); int b(char); void insert(void); int find(void); int main(){ char str[7]; int i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s%s",str,c); if(str[0]=='i'){ insert(); } else if(str[0]=='f'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> #define HASH_SIZE 8388617 typedef struct _node { int val; struct _node *next; } node; void push(node **p, int val) { node *w = (node *)malloc(sizeof(node)); w->val = val; w->next = *p; *p = w; } void terminate(node **p, int n) { int i; node *w1, *w2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246229/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246229/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._node = type { i32,...
/* Dictionary */ #include <stdio.h> #include <string.h> #define M 1046527 //#define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch) { if(ch == 'A') return 1; else if(ch == 'C') return 2; else if(ch == 'G') return 3; else if(ch == 'T') return 4; else return 0; } long long getKey(char s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1046...
#include <stdio.h> #include <string.h> #define T 1000003 char Hash[T][12]; int getChar(char string){ if(string=='A')return 1; else if(string=='C')return 2; else if(string=='G')return 3; else if(string=='T')return 4; else return 0; } int h1(int key){ return key%T; } int h2(int key){ return 1+key%T; } i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246315/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @Hash = dso_local global [1...
/*s1190073 Rina Sato File name: prog4c.c This is double hashing program. */ #include <stdio.h> #include <string.h> #define M 1000003 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch){ if(ch == 'A') return 1; else if(ch == 'C') return 2; else if(ch == 'G') return 3; else if(ch == 'T') retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246380/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1000...
#include<stdio.h> #include<string.h> #define M 1000003 /* your task 1000003 or 999983 */ #define L 14 char H[M][L]; /* Hash Table */ int getChar(char ch){ if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else if ( ch == 'T') return 4; } /* convert a string into an inte...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246423/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1000...
#include<stdio.h> #include<string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; int getChar(char ch){ if(ch == 'A') return 1; else if (ch == 'C') return 2; else if (ch == 'G') return 3; else if (ch == 'T') return 4; else return 0; } long long getKey(char str[]){ long long ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246474/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246474/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1046...
#include <stdio.h> #include <string.h> #define M 1000005 #define L 14 char H[M][L]; int gtchar(char m){ if(m=='A')return 1; else if(m=='C')return 2; else if(m== 'G')return 3; else if(m== 'T')return 4; else return 0; } int h1(int key){ return key % M; } int h2(int key){ return (key % (M-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246517/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1000...
#include<stdio.h> #include<string.h> #define Mtw 1046527 #define NIL (-1) #define Ltw 14 char Htw[Mtw][Ltw]; int getChar(char ch){ if(ch=='A')return 1; else if(ch=='C')return 2; else if(ch=='G')return 3; else if(ch=='T')return 4; else return 0; } long long getKey(char str[]){ long long sum...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246560/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246560/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @Htw = dso_local global [10...
#include<stdio.h> #include<string.h> #define M 1000000 #define L 14 char H[M][L]; int getChar(char ch){ if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else if ( ch == 'T') return 4; else return 0; } long long getKey(char str[]){ long long sum = 0, p = 1, i; for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246603/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246603/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1000...
#include<stdio.h> #include<string.h> #define M 1046527 #define NIL (-1) #define L 14 char H[M][L]; /* Hash Table */ int getChar(char ch){ if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else if ( ch == 'T') return 4; else return 0; } /* convert a string into an inte...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246647/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246647/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1046...
#include <stdio.h> #include <string.h> #define M 1000000 #define L 14 char H[M][L]; /*Hash Table*/ int getChar(char ch){ if(ch == 'A')return 1; else if(ch == 'C')return 2; else if(ch == 'G')return 3; else if(ch == 'T')return 4; } /*convert a string into an integer value*/ long long getkey(char str[]){ long lon...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246698/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246698/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1000...
#include <stdio.h> #include <string.h> #define M 1046257 #define NIL (-1) #define L 14 char H[M][L]; // 文字から数値に変換 int getChar(char ch) { if ( ch == 'A' ) return 1; else if ( ch == 'C' ) return 2; else if ( ch == 'G' ) return 3; else if ( ch == 'T' ) return 4; return 0; } // 文字列から数値へ変換して key を生成する long lon...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246740/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246740/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1046...
#include <stdio.h> #include <string.h> #define M 3442871/* your task*/ #define L 14 char H[M][L]; /* Hash Table */ int getChar(char ch){ if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else if ( ch == 'T') return 4; return 0; } /* convert a string into an integer va...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246791/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246791/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [3442...
#include<stdio.h> #include<string.h> #define M 1046527 #define L 14 #define NIL (-1) char H[M][L]; int getChar(char ch){ if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else if ( ch == 'T') return 4; else return 0; } long long getKey(char str[]){ long long sum = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246841/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246841/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1046...
#include<stdio.h> #include<string.h> char h[1<<21],k[256]; int main(int argc,char *argv[]){ int fg; int vl,s,t; char c; k['T'] = 1; k['G'] = 2; k['C'] = 3; k['A'] = 4; scanf("%d", &vl); getchar(); while (vl--) { s = 0; t = 1; fg = ( c = getchar() ) == 'i'; while ( ( c = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246885/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246885/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @k = dso_local local_unname...
#include<stdio.h> #include<string.h> #define M 1500000 #define N (-1) #define L 14 char H[M][L]; int getChar(char ch){ if ( ch == 'A') return 1; else if ( ch == 'C') return 2; else if ( ch == 'G') return 3; else if ( ch == 'T') return 4; } long long getKey(char str[]){ long long sum = 0, p = 1, i; for ( ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246935/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local global [1500...
#include <stdio.h> int main(void) { int n; int i; int age; int than_ten, ten, twen, thir, four, fif, six; while (1){ scanf("%d", &n); if (n == 0){ break; } than_ten = ten = twen = thir = four = fif = six = 0; for (i = 0; i < n; i++){ scanf("%d", &age); if (age >= 0 && age <= 9){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_246986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_246986/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> /** Application main entry point. */ int main ( int argc, char * argv[ ] ) { for ( ; ; ) { int r[ 7 ] = { 0 }; int n; scanf ( "%d", &n ); if ( !( n ) ) break ; while ( n-- ) { int d; scanf ( "%d", &d ); r[ 0 ] += !!( d < 10 ); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247035/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247035/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AOJ 3051 Lunch // 2018.3.16 bal4u #include <stdio.h> #include <stdlib.h> int main() { int max, a, i, id; max = 0; for (i = 0; i < 3; i++) { scanf("%d", &a); if (a > max) max = a, id = i; } printf("%c\n", 'A' + id); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247086/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247086/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> #define df 0 int dc=100000; #define MAX 100010 int comp(const void*a,const void *b){ int x=*((int*)a),y=*((int*)b); return x-y; } int main(){ if(df)printf("*** debug mode ***\n"); int n; scanf("%d",&n); int a[n],i; for(i=0;i<n;i++) scanf("%d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247136/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247136/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dc = dso_local local_unnam...
#include<stdio.h> int main() { int i,n,mid,mid1,mid2; char c,arr[2007],arr1[2007]; scanf("%d",&n); scanf("%c",&c); if(n%2==0) mid=n/2; else mid=(n+1)/2; for(i=1;i<=n;i++) scanf("%c",&arr[i]); if(n%2==0) { arr1[mid]=arr[1]; mid1=mid+1; mid2=mid-1; for(i=2;i<=n;i++) { if(i%2!...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24718/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main() { int a,b,c; scanf("%d",&a); scanf("%d",&b); b/=2; scanf("%d",&c); c/=4; if(b<a) a=b; if(c<a) a=c; a*=7; printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24723/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24723/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
// 1041 #include <stdio.h> int main() { int i, n, sum, a; while (1) { scanf("%d", &n); if (n == 0) break; sum = 0; for (i = 0; i < n / 4; i++) { scanf("%d", &a); sum += a; } printf("%d\n", sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247295/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247295/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> typedef const void cv; int downint(cv *a, cv *b) { return *(int *)a < *(int *)b ? 1 : *(int *)a > *(int *)b ? -1 : 0; } int main(void){ int n,a[200000],i,j; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } qsort(a,n,sizeof(int),downint); for(i=0;i<n-1;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247338/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247338/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int int_sort( const void * a , const void * b ) { if( *( int * )a < *( int * )b ) { return -1; } else if( *( int * )a == *( int * )b ) { return 0; } return 1; } int main(void){ int N; int A[200000]; int i,j; size_t data_cnt; scanf("%d\n",&N)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247389/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #define MAX 200000 void merge_sort (int array[], int left, int right) { int i, j, k, mid; int work[MAX]; if (left >= right) return; else{ mid = (left + right)/2; merge_sort(array, left, mid); merge_sort(array, mid+1, right); for (i = mid; i >= left;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> void Swap(int x[ ], int i, int j) { int temp; temp = x[i]; x[i] = x[j]; x[j] = temp; } /* クイックソートを行う */ void QSort(int x[ ], int left, int right) { int i, j; int pivot; i = left; /* ソートする配列の一番小さい要素の添字 */ j = right; /* ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247475/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int isPrime(int p) { int i=0; if(p < 2) { return 0; } else if (p ==2) { return 1; } else if (p % 2 == 0) { return 0; } for(i = 3; i * i <=p;i+=2) { if(p%i==0) { return 0; } } return 1; } int main(void) { int n,p,i,cnt=0; scanf("%d",&n); for ( i = 0; i < n; i++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247525/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<math.h> #include <stdbool.h> bool xprime(int x){ int j=3; if(x==2){ return true; } if(x<2||x%2==0){ return false; } while(j<=sqrt(x)){ if(x%j==0){ return false; } j+=2; } return true; } int mai...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247569/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//#include <iostream> #include <string.h> //#include <vector> #include <stdio.h> #include <stdlib.h> //using namespace std; //vector <char> v; int main() { char s[2001]; // string::iterator it; char c[2001]; int n,i=0; scanf("%d",&n); scanf("%s",s); int t=n-2; // cin >> s; while (t>=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24767/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24767/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(){ int a,b,c; int na,nb,nc; int n; scanf("%d %d %d",&a,&b,&c); na=a; nb=b/2; nc=c/4; n=na; if(nb<n) n=nb; if(nc<n) n=nc; if(n<=0) printf("0\n"); else printf("%d\n",7*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24772/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24772/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include<stdlib.h> #include<math.h> int main(){ int num,N,Count=0,i,j; scanf("%d",&num); for(i=0; i<num; i++){ scanf("%d",&N); if(N==1) Count+=1; else{ for(j=2; j<=sqrt(N); j++){ if(N%j==0 && N!=2){ Count+=1; break; } } } } pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247763/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//Prime #include<stdio.h> int Isprime(int x){ int i; if( x < 2) return 0; else if(x == 2 || x == 3) return 1; else if(x % 2 == 0) return 0; else if(x % 3 == 0) return 0; for(i = 5; i * i <= x; i += 2){ if(x % i == 0) return 0; } return 1; } int main(void){ int i; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247806/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247806/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int d = a; if(b/2 < d) d = b/2; if(c/4 < d) d = c/4; printf("%d\n",7*d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24785/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24785/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<math.h> int main() { int n, m=0, i, j, a[10000]; scanf("%d", &n); for(i=0; i<n; i++) { scanf("%d", &a[i]); } for(i=0; i<n; i++) { if(a[i]%2 == 0) { if(a[i] == 2) m++; continue; } j = 3; while(j <= sqrt(a[i])) { if(a[i]%j == 0) {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247893/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> #define N 10000 int prime(int); int main() { int A[N], i, p, number, count=0; scanf("%d", &number); for( i=0 ; i<number ; i++ ){ scanf("%d", &A[i]); p = prime(A[i]); if( p==1 ) count++; } printf("%d\n", count); return 0; } int prime(int a) { int i; if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247936/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a,b,c,i; scanf("%d%d%d",&a,&b,&c); for(i=0;i<1000;i++){ if(a>=i&&b>=2*i&&c>=4*i){ } else{ break; } } printf("%d",7*(i-1)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24798/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <math.h> int PrimeJudge(int); #define N 10000 int main(){ int i,n,flg,prime=0,num[N]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&num[i]); flg=PrimeJudge(num[i]); if(flg==0) prime++; } printf("%d\n",prime); return 0; } int PrimeJudge(int data){ int i=3; if(data=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248029/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248029/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> #define NUMBER 10000 int main() { int n, m; int ans = 0; int i = 0; int array[NUMBER]; scanf("%d", &n); do { scanf("%d", &array[i]); ++i; } while (i < n); for (i = 0; i < n; ++i){ m = 2; while (m < sqrt(array[i])){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248072/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248072/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <math.h> int main() { int n; int i,j,count=0; scanf("%d",&n); int a[n]; for(i=0;i<n;i++){ scanf("%d",&a[i]); for(j=2;j<sqrt(a[i])+1;j++){ if(a[i]==2){ break; } if(a[i]%j==0){ count++; break; } } } printf("%d\n",n-count); return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248115/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248115/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<math.h> int main(void){ int n,i,j,sosu=0,not_sosu=0; int N[10000]; //最初の行読み込み scanf("%d",&n); //続くn個の読み込み for(i=1; i<=n; i++){ scanf("%d",&N[i]); } //素数判定 for(i=1; i<=n; i++){ for(j=2; j<=(int)(sqrt(N[i])); j++){ not_sosu = 0; if(N[i]%j==0){ not_sosu=1; brea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248166/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * * so-suu */ #include<stdio.h> #include<math.h> int A[10000]; int main(void){ int num=0, length, i, j, sq, flag; scanf("%d", &length); for(i=0; i<length; i++){ scanf("%d",&A[i]); } for(i=0; i<length; i++){ flag = 0; sq = (int)sqrt(A[i]); for(j=2; j<=sq; j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248209/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<math.h> int main(){ int num = 0; int *data; int i; int k; int count = 0; int finalans = 0; while(1){ scanf("%d",&num); if(1 <= num && num <=10000){ break; } } data = (int *)malloc(sizeof(int)*num); for(i = 0;i < num;i++){ scanf("%d",&data[i]); if(data[i] > ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248252/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #define N 10000 int main(){ int i,j,n,count; int kazu; scanf("%d",&n); count = n; for(i=0;i<n;i++){ scanf("%d",&kazu); if(kazu == 2){ continue; } else if(kazu%2==0){ count--; continue; } for(j=3;j<=sqrt(kazu);j+=2){ if(kazu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248302/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248302/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int isPrime(int x){ int i; if(x<2) return 0; else if(x==2) return 1; if (x%2==0) return 0; for(i=3; i*i<=x; i+=2){ if(x%i==0) return 0; } return 1; } int main(){ int n,x,i; int ct=0; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d",&x); if(isPrime(x)) ct++; } prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248353/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248353/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> int isPrimeNum( int x ) { int i; for( i = 2; i <= sqrt((double)x); i++ ) if( x % i == 0 ) return 0; return 1; } int main(){ int num; int i,j; int *array; int count = 0; do{ scanf("%d",&num); }while(num < 1 || num > 10000); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248397/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248397/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<float.h> #include<math.h> int main(void) { // your code goes here int a,b; scanf("%d",&a); scanf("%d",&b); int n,i; scanf("%d",&n); int x[n],y[n],v[n]; for(i=0;i<n;i++){ scanf("%d",&x[i]); scanf("%d",&y[i]); scanf("%d",&v[i]); } double time=FLT_MAX; for(i=0;i<n;i++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24844/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<stdlib.h> #include<math.h> static const int N = 10000; static const int MIN = 2; static const int MAX = 10*10*10*10*10*10*10*10; int main(){ int n, i,j,count=0,flag,a=0; int A[N+1]; scanf("%d", &n); if(MIN > n || n > MAX){ printf("不正な数です。"); exit(1); } for ( i = 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248483/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AOJ ALDS1_1_C Prime Numbers // 2018.4.27 bal4u #include <stdio.h> #include <math.h> //#define getchar_unlocked() getchar() int in() { int n = 0, c = getchar_unlocked(); do n = 10*n + (c & 0xf), c = getchar_unlocked(); while (c >= '0'); return n; } int main() { int N, i, a, r, ans; N = in(); ans = 0; whil...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248548/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248548/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i...
#include<stdio.h> #include<math.h> int sosu(int); int main(){ int A[10000],h,i,cnt=0,result; scanf("%d",&h); for(i = 0 ; i < h ; i++){ scanf("%d",&A[i]); result = sosu(A[i]); if(result == 1) cnt++; } printf("%d\n",cnt); return 0; } int sosu(int x){ int i,result = 1; double A = sqrt(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int judge(int); int judge(int num) { int i; if(num == 1) return 0; if(num == 2) return 1; if(num%2 == 0) return 0; for(i=3;i*i<=num;i+=2){ if(num%i == 0) return 0; } return 1; } int main() { int n,num,i,count=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248634/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248634/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int isPrime(int x){ int i; if(x<2)return 0; else if(x==2)return 1; if(x%2==0)return 0; for(i=3; i*i<=x; i+=2){ if(x%i==0) return 0; } return 1; } int main(){ int n,x,i; int cnt =0; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d",&x); if(isPrime(x)) cnt++;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248678/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248678/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int IsPrime(int); int main() { int total, n, i, j, flag = 0,count = 0; scanf("%d", &total); for (i = 0; i < total; i++) { scanf("%d", &n); if (IsPrime(n) == 1) count++; } printf("%d\n", count); return 0; } int IsPrime(int n) { int root,i; if (n == 2 || n == 3)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248720/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248720/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main(){ int i,j,k,n,count = 0,flag = 0; scanf("%d",&i); for(j = 0;j < i;j++){ scanf("%d",&n); if((n%2) == 0){ if(n == 2) count++; continue; } flag = 0; for(k = 1;(2*k+1) <= sqrt(n);k++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248764/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248764/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int isPrime(int x) { int i; if(x<2)return 0; if(x==2)return 1; if(x%2==0)return 0; for(i=3;i*i<=x;i+=2) { if(x%i==0)return 0; } return 1; } int main(void) { int count,n,x,i; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&x); count+=isPrime(x); } printf("%d\n",count); retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248807/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { int a, i, j, m, n, c; char buf[16]; char *p; fgets(buf, 16, stdin); n = atoi(buf); c=0; for (i=0; i<n; i++) { fgets(buf, 16, stdin); p = buf; for (a=0; *p>='0'; p++) a = a * 10 + *p - '0'; m = (int)sqrt(a)+1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248858/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248858/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> #include <math.h> int main(){ int i,j,t,num,m,cnt=0; scanf("%d",&num); for(i=0;i<num;i++){ t=0; scanf("%d",&m); for(j=2;j<=sqrt(m);j++){ if(m%j==0)t=1; } if(t==0)cnt++; } printf("%d\n",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248915/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248915/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int sosu(int); int main() { int number,answer,count,i,z=0; scanf("%d",&count); for(i=0;i<count;i++) { scanf("%d",&number); answer=sosu(number); if(answer)z++; } printf("%d\n",z); return 0; } int sosu(int number) { int i; if(number<=3...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248966/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248966/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #define TRUE 1 #define FALSE 0 int isprime(int); int main(){ int i; int result = 0; int A[10000]; int num=0; scanf("%d",&num); for(i=0;i<num;i++){ scanf("%d",&A[i]); if(isprime(A[i]) == TRUE)result++; } printf("%d\n",result); return 0; } int ispri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249008/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249008/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include <math.h> int main(){ int n, i, j, sum = 0, flag; scanf("%d", &n); int A[n]; for(i = 0 ; i < n ; i++){ scanf("%d", &A[i]); } for(i = 0 ; i < n ; i++){ flag = 0; for(j = 2 ; j <= sqrt((int)A[i]) ; j++){ if(A[i] % j == 0) flag = 1; } if(flag == 0) sum++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249051/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249051/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> #define N 10000 int isPrime(int); int main(){ int x,i,j,u,c=0,count=0; int s[N]; scanf("%d",&x); for(i=0;i<x;i++){ scanf("%d",&s[i]); } for(i=0;i<x;i++){ u = isPrime( s[i] ); if(u == 1) count++; } printf("%d\n",count); return 0; } int isPrime(in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249095/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #define TYPE int #define INF 9223372036854775807 int main() { int N, K; long long ans = INF, tmp = -1; scanf("%d%d", &N, &K); int *X = (int*)malloc(sizeof(int)*N); for (int i = 0; i < N; i++) { scanf("%d", &X[i]); } for (int i = 0; i <= N - K; i++)//先頭から長さK全探索 { tmp =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249145/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define DOT(v1, v2) (v1.x * v2.x + v1.y * v2.y) #define NORM(v) (v.x * v.x + v.y * v.y) typedef struct { double x, y; } point_t; typedef point_t vector_t; typedef struct { point_t p0, p1; } segment_t; typedef segment_t line_t; static vector_t plus(vector_t v1, vector_t v2) { vector_t ret = { v1.x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249189/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249189/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.segment_t = type { ...