Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdlib.h> void swap( int* a, int* b ){ int temp = *a; *a = *b; *b = temp; } void quick_sort( int value[], int left, int right ){ int i; int pivot; int Left = left, Right = right; pivot = value[ ( left + right ) / 2 ]; while( 1 ){ while( pivot > val...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247364/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> /* pivot関数 ピボットの決定を行う 引数は、配列の先頭アドレス、左端のindex、右端のindex 数列の左から見て、最初に得られた異なる2要素のうち 大きいほうの要素番号を返す。 数列の値がすべて同じ場合は -1 を返す。 */ int pivot(int *a, int i, int j) { int k = i + 1; while(k <= j && a[i] == a[k]){ k++; } if(k > j){ return -1; } if(a[i] >= a[k]){ return i; } return k; } /* part...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247421/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247421/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(){ int n,i,j,tmp,flag=0; int *a; scanf("%d",&n); a=(int*)malloc(sizeof(int)*n); for(i=0;i<...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247465/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247465/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...
#define _CRT_SECURE_NO_WARNINGS #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <limits.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <math.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247515/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 i,x,n; int count=0; scanf("%d",&...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247573/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247573/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 sosudiagnosis(int); int main() { int n; //入力できる個数 int s; //数 int l=0; //ループの回数 int count=0;//素数の数 scanf("%d",&n); while(l < n){ l++; scanf("%d",&s); if(sosudiagnosis(s)==1) count++; } printf("%d\n",count); return 0; } int sosudiagnosis(int s) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247630/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 <string.h> #include <stdlib.h> typedef struct { unsigned char a0: 1; unsigned char a1: 1; unsigned char a2: 1; unsigned char a3: 1; unsigned char a4: 1; unsigned char a5: 1; unsigned char a6: 1; unsigned char a7: 1; }boolean; void set_boolean(boolean *bool...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247689/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247689/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.boolean = type { i8...
#include<stdio.h> #include<math.h> int isPrime(int); int main() { int a[10000]; int n=0,i,j,x; scanf("%d",&x); for(i = 0;i < x;i++){ scanf("%d",&a[i]); } for(i = 0;i < x;i++){ if(isPrime(a[i]) == 1) n++; } printf("%d\n",n); return 0; } int isPrime(int x) { int count=0,i=3; if(x == 2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247746/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247746/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() { int n,l,x,i,k; char s[2010],temp[2010]; scanf("%d",&n); scanf("%s",s); i=0,k=0; if(n%2!=0){ temp[n/2]=s[i]; while(i<n) { temp[n/2-k-1]=s[i+1]; temp[n/2+k+1]=s[i+2]; i+=2; k++; }} else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24779/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> /*---?´???°??????(x????´???°??§????????°1)---*/ int prime(int x) { int i, j = 1; for (i = 2; i <= sqrt(x); i++) //2??????x?????????????????§?????? if (x%i == 0) j = 0; //x????´???°??§???????????°j???0 return j; } int main(void) { i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247847/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247847/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 prime(int); int main(){ int n,p,i,j,count=0; scanf("%d",&j); for(i = 1; i <= j; i++) { scanf("%d",&n); p = prime(n); if(p == 1){ count++; } } printf("%d\n",count); return 0; } int prime(int n) { int i; if(n < 2)return 0; else if(n ==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247890/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247890/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 N 10000 int isprime(int); int main(void) { int n, cnt; int i; int a[N]; int b; cnt =0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=0;i<n;i++){ b = isprime(a[i]); if(b==1)cnt++; } printf("%d\n",cnt); return 0; } int isprime(int x){ int i; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247933/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 N 10000 int isprime(int); int main(void){ int n[N],count=0,i,a,j,flag=0; scanf("%d",&a); for(i=0;i<a;i++){ scanf("%d",&n[i]); } for(i=0;i<a;i++){ if(isprime(n[i])==1) count++; } printf("%d\n",count); return 0; } int isprime(int x){ int i; if(x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_247984/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_247984/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 x){ int i; if(x==2) return 0; if(x<2 || x%2==0) return 1; i=3; while(i<=sqrt(x)){ if(x%i==0) return 1; i+=2; } return 0; } int main(){ int n,res=0; int i; int A[10000]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248026/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=1;;i++) { if((a*2)<=b && (a*4)<=c) { printf("%d",a+(a*2)+(a*4)); break; } else{ a--; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24807/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<string.h> #include<stdlib.h> int main(){ int N; int i,j; int a; int count=0; scanf("%d",&N); for(i=1;i<=N;i++){ scanf("%d",&a); if(a==2) count+=1;//a==2は、約数として奇数のみを調べていくため、事前にチェック if(a%2!=0){ j=3; while(1){ if( a < j*j){ count+=1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248127/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248127/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 p_number(int x){ int i; double r; if(x<2){ return 0; }else if(x==2){ return 1; }else if(x%2 == 0){ return 0; } r = sqrt(x); for(i=3;i<=r;i+=2){ if(x%i==0) return 0; } return 1; } int main(){ int num; int i,count=0; int input; scanf("%d",&num); for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248185/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248185/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<string.h> int main(){ int i,num,count,j,sosunum; char s[20]="kakikukeko~~"; char buf[20]; strcpy(buf,s); scanf("%d",&num); int a[num]; double a2[num]; for(i = 0 ; i< num ; i++){ scanf("%d",&a[i]); if(a[i]< 2) count++; else if(a[i] ==2 ) {} else...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248235/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248235/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 N 10000 int prime(int num,int n){ int i; if(num<2) return 0; else if(num==2) return 1; if(num%2 == 0) return 0; for(i=3;i<=num/i;i+=2){ if(num%i == 0) return 0; } return 1; } int main(void){ int i, n=0; int num[N],A=0; sca...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248286/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248286/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 sosu(int); #define true 1 #define false -1 int main(){ int n,i,count=0,num; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&num); if(sosu(num)==true){ count++; } } printf("%d\n",count); return 0; } int sosu(int a){ int i; if(a==2){ return true; } if(a%2==0)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248329/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248329/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) { // your code goes here int n; scanf ("%d",&n); int i; int A[100003],B[100003]={0}; for (i=0;i<n;++i) { scanf ("%d",&A[i]); B[A[i]]++; } for (i=1;i<100003;++i) B[i]=B[i]+B[i-1]; int q; scanf ("%d",&q); for (i=0;i<q;++i) { int t; scanf ("%d",&t); if (t<=100001...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24838/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24838/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 a[100000],n,i,j,c=0,count=0; scanf("%d",&n); for(i=0;i<n;i++) { c=0; scanf("%d",&a[i]); int rt=sqrt(a[i]); for(j=2;j<=rt;j++) { if(a[i]%j==0) c++; } if(c==0) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248422/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 prime(int x) { int temp,i,k; temp=(int)(sqrt(x)); for(i=2;i<=temp;++i) if(x%i==0) { k=0; break; } if(i>temp) k=1; return k; } int main(){ int x; int i,n,count=0; scanf("%d",&n); for(i=0;i<n;i++) { scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248516/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248516/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 number search #include<stdio.h> int era(int e) { int i; //delert 0 and 1 if(e < 2) return 0; else if(e == 2) return 1; if(e % 2 == 0) return 0; //search for(i = 3; i*i <= e; i+=2) { if(e % i == 0) return 0; } return 1; } int main() { int n,i,e,count; //input data sca...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248567/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248567/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 MAXAL 1000000 #define MAX 10000 int isprime(int); int main() { int x[MAXAL],i,m,count=0; scanf("%d",&i); for(m=0;m<i;m++) { scanf("%d",&x[m]); if(isprime(x[m])==1) count++; } printf("%d\n",count); return 0; } int isprime(int x) { int i,rou...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248617/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 n,*a,i,k,p,kazu=0,s=0; scanf("%d",&n); a=(int *)malloc(n*sizeof(int)); for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=0;i<n;i++){ if(a[i]==2)kazu++; else if(a[i]%2 !=0&&a[i] !=1){ for(k=2;k<=(sqrt(a[i]));k++){ p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248660/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 #define MAX 100000000 int judge(int); int main() { int i, n, count=0, a[N]; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d", &a[i]); if((judge(a[i])) == 1)count++; } printf("%d\n",count); return 0; } int judge(int a) { int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248703/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 prime(int); int main(){ int n,cnt=0,x,d,i,a[10000]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); if(prime(a[i])==1){cnt++;} } printf("%d\n",cnt); return 0; } int prime(int a){ int d; if(a==2){return 1;} if((a<2)||(a%2==0)){retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248747/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> static int true = 1; static int false = 0; int isprime(int x); int main(void) { int n; int num; int prime = 0; int i; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &num); if (isprime(num) =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248798/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 prime(int x){ int i; for(int i=2;i*i<=x;++i) if(x%i==0) return 0; return 1; } int main(){ int n,x,i,cnt=0; scanf("%d",&n); for(i=1;i<=n;++i){ scanf("%d",&x); cnt+=prime(x); } printf("%d\n",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248840/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; i = 3; if(x==2) return 1; if(x<2 || x%2==0) return 0; while(i*i<=x){ if(x%i==0) return 0; i += 2; } return 1; } int main() { int n, i, x, count; count = 0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&x); if(isPrime(x)==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248891/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 100000 int isprime(int); int main(){ int num[N]; int n,a,b,i,j; int count = 0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&num[i]); } for(i=0;i<n;i++){ a=num[i]; b=isprime(a); if(b==1) count++; } printf("%d\n",count); return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248934/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 is(int); int main(){ int n,count=0,i; scanf("%d",&n); int a[n],b=3,c; for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=0;i<n;i++){ c=is(a[i]); if(c==1) count++; } printf("%d\n",count); return 0; } int is(int x){ int b=3; if(x==2) return 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248985/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, n, input, count=0; scanf("%d", &n); for(i = 0; i < n; i++){ scanf("%d", &input); j = 2; while(j <= sqrt(input)){ if(input % j == 0){ j = 1; break; } j++; } if(j != 1){ count++; } } printf("%d\n", count); return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249027/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 prime(int e); int main(void) { int sum = 0; int n; scanf("%d", &n); for(int i = 0; i < n; i++) { int E; int judge = 0; scanf("%d", &E); judge = prime(E); if(judge == 1) sum++; } printf("%d\n", sum); return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249070/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 prime(int); int main(){ int n,i,j,s,sum=0,a[10000]; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d",&a[i]); } for(i=0; i<n; i++){ s=prime(a[i]); if(s==1) sum++; } printf("%d\n",sum); return 0; } int prime(int a){ int i; if(a<2) return 0; else if(a==2) return 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249113/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 dai(int a,int b){ if(a > b){ return a; } else{ return b; } } int main(void){ int a , b , c; scanf("%d %d %d",&a ,&b ,&c); int max = dai(a,dai(b,c)); int sa = max - a , sb = max - b , sc = max - c; int flag = 1 , ans = 0; while(flag == 1){ if(sa%2 + sb%2 + sc%2 ==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249157/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249157/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> inline static void put_int(int x) { int s = 0; char f[6] = {'0', '0', '0', '0', '0', '0'}; if (!x) { putchar_unlocked('0'); return; } while (x) { f[s++] += x % 10; x /= 10; } while (s--) putchar_unlocked(f[s]); } int main() { int flag...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249207/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249207/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...
// AtCoder ABC136: D - Gathering Children // 2019.8.26 bal4u #include <stdio.h> //// 高速入力 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) int ins(char *s) { // 文字列の入力 スペース以下の文字で入力終了 char *p = s; do *s = gc(); while (*s++ > ' '); *--s = 0; return s - p; } void out(int n) { // 非負整数の表示(出力) int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249250/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249250/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<stdlib.h> #include<string.h> int W[30],V[30],D,p,i,j,q=0,dp[30],l,r=0; char c[3]; int main() { memset(dp,-1,sizeof(dp)); dp[0]=0; scanf("%d",&D); for(i=2;i--;) { scanf("%d",&j); l+=j; for(;j--;) { scanf("%s%d\n",c,&p); if(strcmp(c,"DD")*strcmp(c,"D")==0) { W[q]=strle...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249300/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249300/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" @q = dso_local local_unname...
#include<stdio.h> #include<string.h> int main(){ int i; char s[100]; while(fgets(s,80,stdin)!=NULL){ while(1){ for(i=0;s[i];i++){ if('a'<=s[i]&&s[i]<='z'){ s[i]++; if(s[i]=='z'+1)s[i]='a'; } } if(strstr(s,"this")||strstr(s,"that")||strstr(s,"the"))break; } printf("%s",s); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249373/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 <string.h> int main(void){ char str[81]; char str2[81]; int key; int len; int i, j; while(1){ if(scanf("%[^\n]%*c", str) == EOF) break; len = strlen(str); for(i=0; i < len; i++){ strcpy(str2, str); if(str2[i] >= 't'){ key = 't' - str2[i]; }else{ key ='t' - ('z...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249467/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249467/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(){ int i,j,flag=0; char s[256]; while(fgets(s,sizeof(s),stdin)!=NULL){ flag=0; for(i=1;i<=26;i++){ for(j=0;j<strlen(s);j++){ if(97<=s[j]&&s[j]<=122) { if(s[j]+1>122) s[j]=(s[j]+1)%122+96; else s[j]=s[j]+1; } } for(j=0;j<strlen(s);j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249517/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<stdlib.h> int N,M,A,i,a[1001][3],r[101]; int c(const void *a,const void *b) { return ((int*)b)[0]-((int*)a)[0]; } int main() { for(;scanf("%d%d%d",&N,&M,&A),N;) { for(i=0;i<M;i++) scanf("%d%d%d",&a[i][0],&a[i][1],&a[i][2]); qsort(a,M,sizeof(int[3]),c); for(i=1;i<=N;i++)r[i]=i; f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249575/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249575/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...
//set many funcs #include<stdio.h> #include<string.h> #include<stdlib.h> #define inf 1072114514 #define llinf 1145141919810364364 #define mod 1000000007 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int round(int a,int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249625/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 min(A,B) ((A) < (B) ? (A) : (B)) #define IMPOSSIBLE 1000 void swap(int* a, int* b) { int c = *a; *a = *b; *b = c; } /* 配列aを配列bに並び替えるための最小入れ換え回数を返す */ int solve(const int* a, const int* b, int n) { int i, j; /* 含まれる0と1の個数が等しいか確かめる */ int a_sum = 0, b_sum = 0; for (i = 0; i < n; i++) a_s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249669/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...
// 実行時間29ms, メモリ896KB #include <stdio.h> int main() { int i, j, k, d, n; scanf("%d %d", &n, &k); int h[n+k]; int cost[n+k]; for (i=0; i<n; i++) scanf("%d", &h[i]); for (; i<n+k; i++) { h[i] = h[n-1]; cost[i] = 0; } for (i=n-1; i>=0; i--) { cost[i] = h[i]-h[i+k]; if (cost[i]<0) cos...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249711/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249711/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> long int dp[100005],h[100005]; /*long int min(long int a,long int b) { if(a>=b) return b; else return a; }*/ void rec(long int n,int k) { if(n==1) dp[1]=0; else if(n<=k) { long int min=1e9; for(int j=n-1;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249755/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249755/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" @dp = dso_local local_unnam...
#include <stdio.h> #include <stdlib.h> int main(void){ int n,k,h[100000],dp[100000]; int i,l; scanf("%d %d",&n,&k); for(i=0;i<n;i++){ scanf("%d",&h[i]); dp[i] = 10000000000; } dp[0] = 0; for(i=1;i<n;i++){ for(l=1;l<=k;l++){ if(i-l<0){ break; } if(dp[i] > dp[i-l]+abs(h[i]-h[i-l])){ dp[i] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249812/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...
#if 0 cat <<EOF >mistaken-paste #endif // thanks for @rsk0315_h4x #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #define _USE_MATH_DEFINES #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <time.h> #define BIG 2000000007 #def...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249863/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.hwll = type { i64, ...
#include <stdio.h> #include <math.h> int main(void){ double x1,x2,y1,y2,x,y; scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2); x = x2 - x1; y = y2 - y1; printf("%lf\n" , sqrt(x*x+y*y)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249906/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> typedef struct { char first[20]; char last[20]; } nametype; typedef struct { int id; nametype name; } studenttype; int main() { int i,j,m,n,t; scanf("%d", &t); while(t--){ scanf("%d", &n); char str[n]; int odd=0,even=0; sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24995/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 argc, char** argv) { double x1, y1, x2, y2, result; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); double x = fabs(x1 - x2); double y = fabs(y1 - y2); result = sqrt((x * x) + (y * y)); printf("%f\n", result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249993/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249993/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){ double x1,x2,y1,y2,c; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); c=sqrt(pow((x2-x1),2)+pow((y2-y1),2)); printf("%lf\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250034/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() { double x1, y1, x2, y2; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); printf("%f", sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250078/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250078/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(){ double x1, y1, x2, y2; scanf( "%lf %lf %lf %lf", &x1, &y1, &x2, &y2 ); printf( "%lf\n", hypot(x2-x1,y2-y1) ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250128/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){ double x1,y1,x2,y2; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); printf("%f\n",sqrt((pow((x1-x2),2)+(pow((y1-y2),2))))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250171/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 argc, const char * argv[]) { double x1,y1,x2,y2; double x; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); x = sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); printf("%f\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250214/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250214/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(){ double ax, bx, ay, by; scanf("%lf %lf %lf %lf", &ax, &ay, &bx, &by); printf("%.8f\n", sqrt((bx - ax) * (bx - ax) + (by - ay) * (by - ay))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250258/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) { double x1, y1, x2, y2; if (scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2) != 4) return 1; printf("%.15f\n", sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250300/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250300/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(){ double dis, a,b,c,d; scanf("%lf%lf%lf%lf", &a, &b, &c, &d); dis = sqrt((a-c)*(a-c)+(b-d)*(b-d)); printf("%.8f\n", dis); return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250344/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250344/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){ double x1,x2,y1,y2,x,y; scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2); x = x2 - x1; y = y2 - y1; printf("%lf\n" , sqrt(x*x+y*y)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250388/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250388/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(){ double x1,y1,x2,y2; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); printf("%f\n",sqrt(pow(x1-x2,2)+pow(y1-y2,2))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250430/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250430/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) { double x1,y1,x2,y2,d,d1,d2; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); d1=pow(x2-x1,2.0); d2=pow(y2-y1,2.0); d=sqrt(d1+d2); printf("%f\n",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250474/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250474/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 sta[10]; int v1,v2; float lon; int i,n,comp; while(1){ lon = comp = 0; for(i = 0; i < 10; i++){ scanf("%d,", &sta[i]); lon += sta[i]; } if(scanf("%d,%d", &v1, &v2) == EOF) break; lon = lon * 1.0 * v1 / (v1 + v2); for(i = 0; i < 10; i++){ c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250517/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 l[10],v1,v2,i,len=0,j; double time,d; while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2)!=EOF){ for(i=0;i<10;i++){ len+=l[i]; } //pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250560/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250560/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> int main(){ int n; scanf("%d",&n); if(n==2){ printf("%d",2); }else{ printf("%d",1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25064/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25064/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 <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250733/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250733/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){ // Your code here! int n, i, ans[100001] = {}, x, y, z; scanf("%d", &n); for (x = 1; x * x + 2 * x < n; x++) { for (y = 1; y * y + 2 * y < n; y++) { for (z = 1; z*z+2*z<n;z++) { ans[x * x + y * y + z * z+x*y+z...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250777/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250777/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, b, sum, i; while(scanf("%d%d", &a, &b)!=EOF) { i=0; sum=a+b; while(sum>0) { i=i+1; sum=sum/10; } printf("%d\n", i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250827/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; int i, temp; int count = 1; for(i = 0; i <= 200; i++) { if(scanf("%d %d", &a, &b) == EOF) break; temp = a + b; count = 1; while(1) { if((temp - 10) < 0) { printf("%d\n", count); break; } else { temp /= 10; count++; } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250870/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250870/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, sum = 0, digit = 0; while(scanf("%d %d", &a, &b) != EOF){ sum = a + b; while(sum != 0){ sum = sum / 10; digit++; } printf("%d\n", digit); digit = 0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250913/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250913/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,i,x,ans; while(scanf("%d %d",&a,&b)!=EOF){ ans=0; x = a + b; while(1){ ans++; if(x < 10)break; x = x / 10; } printf("%d\n",ans); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250957/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250957/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,k,m; scanf("%d%d",&a,&b); int p[a],q[b],i; scanf("%d%d",&k,&m); for(i=0;i<a;i++) scanf("%d",&p[i]); for(i=0;i<b;i++) scanf("%d",&q[i]); if(p[k-1]<q[b-m]) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2510/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2510/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 co...
#include<stdio.h> int main(){ int num[2], n; int i, j; for(i=0;i<200;i++){ if(scanf("%d %d",&num[0],&num[1])==EOF){ break; } j = 0; n = num[0] + num[1]; while(n>0){ n = n/10; j++; } printf("%d\n",j); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251042/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 keta(int num){ int c; if(num < 10) num = 1; if(num >= 10 && num < 100) num = 2; if(num >= 100 && num < 1000) num = 3; if(num >= 1000 && num < 10000) num = 4; if(num >= 10000 && num < 100000) num = 5; if(num >= 100000 && num < 1000000) num = 6; if(num >= 1000000) num = 7...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251086/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251086/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; int rem,sum; while(scanf("%d %d",&a,&b)!=EOF) { int sum=a+b; int count=0; while(sum!=0) { rem=sum%10; count++; sum/=10; } printf("%d\n",count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251129/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251129/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 k, n, s, p; scanf("%d%d%d%d", &k, &n, &s, &p); n = n%s?n/s+1:n/s; k *= n; printf("%d", k%p?k/p+1:k/p); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25118/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25118/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<string.h> int main() { int a ,b ; while( scanf( "%d %d" ,&a ,&b ) != EOF ) { char str[ 256 ] ; sprintf( str ,"%d" ,a + b ) ; printf( "%d\n" ,strlen( str ) ) ; } return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251222/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251222/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 a, b; while (scanf("%d%d", &a, &b) != EOF) { int c = a + b; int x = floor(log10(c)) + 1; printf ("%d\n", x); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251266/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,add,cnt; while(scanf("%d %d",&a,&b)!=EOF) { add=a+b; cnt=0; while(1) { cnt++; if(add/10==0) break; else add/=10; } printf("%d\n",cnt); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251309/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251309/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 i, j, sum, d; while (scanf("%d", &i) != EOF) { scanf("%d", &j); d = 1; sum = i+j; while ((sum = sum / 10) != 0) { d++; } printf("%d\n", d); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251374/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251374/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,i,sum; while(scanf("%d %d",&a,&b)!=EOF){ sum=a+b; i=1; while(sum>9){ sum=sum/10; i++; } printf("%d\n",i); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251439/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251439/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, sum, digit; while( scanf( "%d%d", &a, &b ) != EOF ) { for( sum = a + b, digit = 0; sum; sum /= 10, digit++ ) ; printf( "%d\n", digit ); } return( 0 ); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251482/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 x, y; while(scanf("%d %d", &x, &y) != EOF){ int i = ceil(log10(x + y + 1)); printf("%d\n", i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251532/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=1; while(scanf("%d %d",&a,&b)!=EOF){ c=a+b; while(c>=10){ c=c/10; i++; } printf("%d\n",i); i=1; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251576/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251576/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 keta(int num){ int count=0; while(num>0){ num/=10; count+=1; } return count; } int main(){ int a,b; while(scanf("%d %d",&a,&b) != EOF){ printf("%d\n",keta(a+b)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251633/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251633/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 n[200][2] = {}, i = 0, a, sum, digit; while (scanf("%d %d", &n[i][0], &n[i][1]) != EOF) { i++; } for (a = 0; a < i; a++) { sum = n[a][0] + n[a][1]; digit = 0; while (sum != 0) { sum = sum / 10; digit++;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251684/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251684/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, tmp, result; while (1) { result = 0; if (scanf("%d %d", &a, &b) == EOF) { break; } else { tmp = a + b; while(tmp != 0){ tmp = tmp / 10; resu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251727/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251727/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() { long int a,b,c,co=0; while(scanf("%ld%ld",&a,&b)!=EOF) { c=a+b; co=0; while(c>0) { c=c/10; co++; } printf("%ld\n",co); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251770/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251770/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 NO_DATA -1 #define MAX_COUNT 200 int main(int argc, const char * argv[]) { // insert code here... int result[MAX_COUNT]; int data[MAX_COUNT][2]; int scanResult; for (int i = 0; i < MAX_COUNT; i++ ) { result[i] = NO_DATA; } scanResult = scanf("%d ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251828/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251828/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) { long long int a, b, c; int j=0, n; while(scanf("%lld%lld", &a, &b)!=EOF) { for(c=a+b; c>0; c/=10) j++; printf("%d\n", j); j=0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251871/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251871/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 MAXPROCS 100000 typedef struct { char name[11]; int time; } proc; int main(void) { int i; int procs_n, quan; scanf("%d %d", &procs_n, &quan); proc queue[MAXPROCS]; for (i = 0; i < procs_n; i++) { scanf(" %s %d", queue[i].name, &queue[i].time); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251914/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251914/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.proc = type { [11 x...
#include <stdio.h> #include <string.h> #define N 100000 typedef struct{ int time; char name[10]; }Pro; int head,tail,n; int min(int,int); void enqueue(Pro); Pro dequeue(void); Pro Q[N]; int main(){ int q,i,c,e=0; Pro z; scanf("%d%d",&n,&q); for(i=1;i<=n;i++){ scanf("%s%d" ,Q[i].name,&Q[i].time); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251965/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251965/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.Pro = type { i32, [...
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; P Q2[LEN+1]; int head=0, tail=0, n; void enqueue(P x){ Q[tail]=x; if((tail+1)==LEN) tail = 0; else tail++; } P dequeue(){ P x; x = Q[head]; if((head+1)==LEN) head = 0; else he...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252007/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252007/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.pp = type { [100 x ...
#include <stdio.h> #include <string.h> #define N 1000000 /* Q's length */ /* P's member */ typedef struct{ char name[100]; int t; }P; P Q[N]; /* make Q */ int head, tail, n; void enqueue(P x){ Q[tail] = x; tail++; } P dequeue(){ P x = Q[head]; head++; return x; } /* small number return */ int mini(in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252050/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.P = type { [100 x i...
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN]; int head,tail,n; void enqueue(P x){ Q[tail] = x; tail = (tail + 1) % LEN;/*ring buffer*/ } P dequeue(){ P x; x = Q[head]; head = (head + 1) % LEN; return x; /*?§????????????£??\??...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252094/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.pp = type { [100 x ...
#include <stdio.h> #include <string.h> #define N 100000 int main(){ int n, q, time[N], head = 0, tail = 0, t_sum = 0, i; char name[N][11]; scanf("%d%d" ,&n ,&q); for(i = 0; i < n; i++){ scanf("%s%d", name[i], &time[i]); tail += 1; } if(tail == 1){ printf("%s %d\n", name[head], time[hea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252137/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 MAX 10 typedef struct __queue_ { char name[MAX]; int time; struct __queue_ *next; } __queue_t; int main() { __queue_t *head = malloc(sizeof(__queue_t)); __queue_t *tail = head; tail->next = NULL; int n, q, now = 0; scanf("%d %d", &n, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252180/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252180/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.__queue_ = type { [...
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P); P dequeue(void); int min(int,int); int main(){ int elaps = 0, c; int i, q,n,s; P u; scanf("%d %d", &n, &q); for ( i = 1; i <= n; i++){ scanf("%s",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252223/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252223/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.pp = type { [100 x ...