Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <string.h> #include <math.h> int main() { int a, b; int n; int p; double rs; int arr[1000][3]={0}; scanf("%d %d", &a, &b); scanf("%d", &n); for(p=0;p<n;p++) { scanf("%d %d %d", &arr[p][0], &arr[p][1], &arr[p][2]); if(p==0) rs=sqrt((double)((a-arr[p][0])*(a-arr[p][0])+(b-arr[p][...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24892/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 judge_prime(int *); int main(){ int n,i,prime_count; int *p; prime_count = 0; scanf("%d",&n); if(n < 1 || 10000 < n)exit(0); p = malloc(n*sizeof(int)); for(i = 0; i < n; i++){//inputxn scanf("%d",p+i); if(*(p+i) < 2 || 1000000...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248963/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248963/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); #define N 10000 int main(){ int n,i,judge; int num[N]; scanf("%d",&n); judge=0; for(i=0;i<n;i++){ scanf("%d",&num[i]); judge=judge+isPrime(num[i]); } printf("%d\n",judge); return 0; } int isPrime(int x){ int i; if(x==2) return 1; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249012/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 a) { int i;for(i=2; i*i<=a; i++) if(a%i==0) return 0; return (a>1?1:0); } int main(void) { int n, i, ans=0; scanf("%d",&n); for(i = 0; i < n; i++){ int num; scanf("%d",&num); ans += isPrime(num); } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249056/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 na,nb; scanf("%d%d",&na,&nb); int k,m,i; scanf("%d%d",&k,&m); int array1[na+50],array2[nb+50]; for(i=0;i<na;i++) scanf("%d",&array1[i]); for(i=0;i<nb;i++) scanf("%d",&array2[i]); int num=array1[k-1],index; for(i=0;i<nb;i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2491/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2491/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 <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main(void){ int n, k, i; int x[100000]; scanf("%d%d", &n, &k); for(i=0; i<n; i++){ scanf("%d", x+i); } int l=n-k+1; int min=INT_MAX; for(i=0; i<l; i++){ int now; if(x[i]>=0){ now = x[i+k-1]; }else if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249142/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){ double a, b, c, d, i1, j1, i2, j2, x1, y1, x2, y2; int n; scanf("%lf %lf %lf %lf", &a, &b, &c, &d); if(a != c && b != d){ i1 = (d - b)/(c - a); j1 = b - i1 * a; i2 = -1 / i1; scanf("%d", &n); for(c = 0; c < n; c++){ scanf("%lf ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249193/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(){ char s[100000]; scanf("%s",s); int n =strlen(s); s[n] = 'e'; int i=0; int j=1; int count; int a[100000]; for(i=0;i<n;i++){ a[i] = -1; } //RLになってるところ以外は全部0 //LRになってるところで一区切り int fcheck=0,bcheck; int rcheck,l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249236/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> #define MAX 100001 int main(void){ int i,j; char str[MAX]; scanf(" %s",str); long ans[MAX]; for(i=0;i<MAX;i++){ ans[MAX]=0; } long r_num=0,l_num=0,repeat_place; for(i=0;i<strlen(str);i++){ if(str[i]=='R'){ if(l_num==0){ r_num++; }el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249287/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 d,t,min=1000000000.00; int n,a,b,x,y,v,i; scanf("%d %d %d",&a,&b,&n); for(i=1;i<=n;i++) { scanf("%d %d %d",&x,&y,&v); d=sqrt((x-a)*(x-a)+(y-b)*(y-b)); t=d/v; if(t<min) min=t; } printf("%lf",min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24933/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> void convert(char *str) { int i=0; while(*(str+i)!='\0') { if(*(str+i)>'a'&&*(str+i)<='z') { *(str+i)-=1; } else if(*(str+i)=='a') { *(str+i)='z'; } i++; } } int main() { char str[81]; int flg; int i; while(fgets(str,81,stdin)!=NULL) { flg=0; while(!flg) { conve...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249423/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 <stdbool.h> #include <string.h> void nshift( char *s, int n ){ int i; for( i=0; i<strlen(s); i++ ){ if( s[i] == ' ' || s[i] == '.' || s[i] == ',' ) continue; s[i] = s[i]+n; if( s[i] == 123 )s[i] = 'a'; if( s[i] == 96 ) s[i] = 'z'; } } int main(){ char s[81]; char list[3][6...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249502/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249502/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" @__const.main.list = privat...
#include <stdio.h> int main(void){ int n,m,a,b[100],i,j,tmp; int h[1000],p[1000],q[1000]; for(;;){ for(i=0;i<100;i++){ b[i]=i+1; } for(i=0;i<1000;i++){ h[i]=0;p[i]=0;q[i]=0; } scanf("%d %d %d",&n,&m,&a); if(n+m+a==0){ break;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249553/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(void){ long long int n,i,a[100000],b[100000]; scanf("%lld",&n); long long int max=0,index=0; for(i=0;i<n;i++){ scanf("%lld%lld",&a[i],&b[i]); if(max<a[i]){ max=a[i]; index=i; } } printf("%lld",max+b[index]); return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249610/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 2746: jfen // 2017.10.9 bal4u@uu #include <stdio.h> #include <ctype.h> #include <string.h> char map[10][10]; char s[500]; int main() { int w, h, r, c, k, r1, c1, r2, c2; char *p; while (scanf("%s", s) && *s != '#') { memset(map, 0, sizeof(map)); p = s, r = c = 0; while (*p) { if (isdigit(*p)) c +...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249654/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> #define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++) #define rep(i,n)Rep(i,0,n) #define mi(x,y) (x<y?x:y) #define N 100009 int main() { int n,k,h[N]={0},dp[N]={0}; scanf("%d%d",&n,&k); rep(i,n)scanf("%d",&h[i+1]); dp[0]=N; rep(i,n)dp[i+2]=abs(h[2]-h[1]); Re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249698/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249698/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 <limits.h> int chmin(int a, int b) { if (a > b) return b; return a; } int n; int k; int h[100010]; int dp[100010]; int main(int argc, char const *argv[]) { scanf("%d%d", &n, &k); for (int i = 0; i < n;i++) { scanf("%d", h+i); dp[i] = INT_MAX; } dp[0] = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249740/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249740/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 <limits.h> int min(int a, int b) { if(a >= b) { return b; } else { return a; } } int main(void) { int N, K; scanf("%d %d", &N, &K); int *h, *dp, *c; h = (int*)malloc(N * sizeof(int)); dp = (int*)malloc(N * sizeof(int)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249784/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249784/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 MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) void run(void){ int n,k; scanf("%d%d",&n,&k); int *h=(int *)calloc(n,sizeof(int)); int i; for(i=0;i<n;i++) scanf("%d",h+i); int *dp=(int *)calloc(n,sizeof(int)); for(i=1;i<n;i++){ dp[i]=10000000...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249841/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249841/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,distance; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); distance = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); printf("%f", distance); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249892/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; double a; double x,y; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); x=fabs(x2-x1); y=fabs(y2-y1); a=sqrt(x*x+y*y); printf("%f\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249935/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, char** argv){ double x1,y1,x2,y2; // Input scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2); // Calc & Output printf("%f\n", sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) )); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249979/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249979/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<ctype.h> char s[1200]; int main() { int i, t, len; scanf("%d", &t); while(t--){ scanf("%d%s", &len, s); int oddeven = 0, evenodd = 0; for(i = 0; s[i] != '\0'; i += 2){ if((s[i] - '0') % 2 == 0) oddeven ++; } for(i = 1; s[i] != '\0'; i += 2){ if((s[i] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25002/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25002/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(void){ double x1,y1,x2,y2,sd; scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2); sd=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1); printf("%lf\n",sqrt(sd)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250063/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250063/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<math.h> #include <stdio.h> int main(void) { double x1, y1, x2, y2,r,kyori; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); r=pow(x2-x1,2)+pow(y2-y1,2); kyori = sqrt(r); printf("%f\n", kyori); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250113/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,x2,y1,y2,r; scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2); r=sqrt(pow(x2-x1,2)+pow(y2-y1,2)); printf("%f",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250157/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250157/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 n,m,k,i,xx,min,max,mid; int q[200010],v1[200010],d[200010],w[200010],x1[200010],y1[200010],z1[200010],y[200010],z[200010]; int v2[200010],l[200010],r[200010]; int check(int mid) { int i,j,u,v,h,t,tot; h=0;t=1;q[1]=xx; for(i=1;i<=n;i++)v2[i]=0; v2[xx]=1;tot=1; while(h<t) { h++; u=q[h];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25020/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25020/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" @xx = dso_local global i32 0,...
#include <stdio.h> #include <math.h> #define POW(x) ((x) * (x)) int main(){ double x1, y1, x2, y2; scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); printf("%.8f\n", sqrt(POW(x2 - x1) + POW(y2 - y1))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250243/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250243/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...
/* ファイル名:ITP1_10_A.c */ /* 内容:2点 P1(x1, y1), P2(x2, y2) の距離を求める */ /* include */ #include <stdio.h> #include <math.h> /* 外部変数宣言 */ /* プロトタイプ宣言 */ /* 関数名:main */ /* 処理内容:2点 P1(x1, y1), P2(x2, y2) の距離を求める */ int main( void ) { /* 内部変数定義 */ /* 入力 */ double x1; /* P1のx座標 */ double y1; /* P1のy座標 */ double x2; /* P2の...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250287/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 n; scanf("%d",&n); if(n==2) { printf("2\n"); } else { printf("1\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25033/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25033/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(void) { double x1, y1, x2, y2; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); printf("%lf\n", sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250373/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("%.8lf\n", hypot(x1-x2, y1-y2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250416/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; scanf("%d", &n); if(n==2) printf("2\n"); else printf("1\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25046/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(void) { double x1, x2, y1, y2; double X, Y, L; scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); X=pow(x1-x2, 2); Y=pow(y1-y2, 2); L=sqrt(X+Y); printf("%f\n", L); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250502/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250502/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() { double L[10]; double V1, V2; double meet_pos, railway_lenth; int cnt, output_cnt; int output[50]; output_cnt = 0; /*Input and process*/ while(scanf("%lf,", &L[0]) != EOF){ for(cnt = 1; cnt < 10; cnt++) scanf("%lf,", &L[cnt]); scanf("%lf,%lf"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250546/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250546/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 i,sum,v1,v2; int l[10]; double len,tmp; while(scanf("%d,",&l[0]) != EOF){ sum = l[0]; for(i = 1;i < 10;i++){ scanf("%d,",&l[i]); sum += l[i]; } scanf("%d,%d",&v1,&v2); len = (sum*1.0)/((v1+v2)*1.0)*v1; tmp = 0.0; for(i = 0;i < 10;i++){ tmp += (l[i]*1.0);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250618/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250618/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; scanf("%d",&n); int ans[n + 1]; for(int i = 1; i <= n; i++) ans[i] = 0; for(int i = 1; i < 105; i++) for(int j = 1; j < 105; j++) for(int k = 1; k < 105; k++){ int m = i * i + j * j + k * k + i * j + i ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250676/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,N,x,y,z,count=0,formula; scanf("%d", &N); for (i = 1; i <= N; i++) { count = 0; for (x = 1; x <=100; x++) { if (x > i) { break; } for (y = 1; y <= 100; y++) { for (z = 1; z <= 100; z++) { formula=x* x + y * y + z * z + x * y + y * z + z * x; if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250719/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,i=0,u=0,e=0,o,yama[201]; while(scanf("%d %d",&a,&i)!=EOF){ o=a+i; for(u=0;o!=0;u++){ o/=10; } yama[e]=u; e++; } for(u=0;u<e;u++){ printf("%d\n",yama[u]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250856/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250856/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 o[100002]; int p[100002]; int main() { int a,b,k,m,x,y,i; scanf("%d %d",&a,&b); scanf("%d %d",&k,&m); for(i=0;i<a;i++) { scanf("%d",&o[i]); if(i==(k-1)) x=o[i]; } for(i=0;i<b;i++) { scanf("%d",&p[i]); if(i==(b-m)) y=p[i]; } if(y>x) printf("YES\n"); els...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2509/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(void){ int i,a,b,c; while (scanf("%d %d", &a, &b) != EOF){ c=a+b; for(i=0;c!=0;i++){ c=c/10; } printf("%d\n",i); } return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250942/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250942/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; int i=0,sum=0; while(scanf("%d %d", &a,&b) != EOF){ sum = a + b; while(sum){ sum /= 10; i++; } printf("%d\n",i); i=0; } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250986/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 a; int b; char tmp[16]; while(scanf("%d %d", &a, &b) != EOF){ sprintf(tmp, "%d", a+b); printf("%d\n", strlen(tmp)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251028/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 long int n=0,a,b; int count=0; while (scanf("%lld%lld",&a,&b)==2) { count = 0; n = 0; n = a+b; while (n!=0) { n /= 10; count++; } printf("%d\n",count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251071/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,p,q=0; while(1){ if(scanf("%d%d",&a,&b) == EOF) break; sum=a+b; p=0; while(sum!=0){ sum/=10; p++; } printf("%d\n",p); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251114/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 a, b; char buf[16]; while(scanf("%d %d", &a, &b) != EOF) { sprintf(buf, "%d", a+b); printf("%d\n", strlen(buf)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251165/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>=1000000){ printf("7\n"); } else if(a+b>=100000){ printf("6\n"); } else if(a+b>=10000){ printf("5\n"); } else if(a+b>=1000){ printf("4\n"); } else if(a+b>=100){ printf("3\n"); } else if(a+b>=10){ pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251208/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,x,s; while(scanf("%d %d",&a,&b)!=EOF){ x=a+b; s=0; while(0<x){ s++; x=x/10; } printf("%d\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251251/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251251/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 long a,b,s,rem,c=0; while(scanf("%lld %lld",&a,&b)!=EOF) { s=a+b; while(s!=0) { s=s/10; c++; } printf("%lld\n",c); c=0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251295/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251295/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,a,b,c; scanf("%d%d%d%d",&k,&n,&s,&p); a=(k*n)/(s*p); read: b=(a*p)/k; c=(b*s)/n; if(b>0&&c>0) { printf("%d\n",a); } else { a++; goto read; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25136/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25136/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 k , n , s , p , ans , a , b; scanf("%d %d %d %d",&k,&n,&s,&p); a = n%s ; b = a==0?(n/s):(n/s)+1; a = b*k; b = a%p; ans = b==0?(a/p):(a/p)+1; printf("%d\n",ans); return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25141/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 (void) { int i, j; while (EOF != scanf ("%d %d", &i, &j)) { int k = 0; int sum = i + j; while (sum > 0) { sum /= 10; k++; } printf ("%d\n", k); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251468/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251468/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, ab, count; while( scanf("%d %d", &a, &b) != EOF ){ ab = a + b; count = 0; while( ab > 0 ){ ab /= 10; count++; } printf("%d\n", count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251510/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251510/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)){ printf("%d\n",1+(int)log10(a+b)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251561/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251561/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 a,b; int i,tmp; while(scanf("%d %d",&a,&b)!=EOF){ printf("%d\n",(int)log10((float)a+b) + 1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251619/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 a,b,g; char g2[100]; while(scanf("%d %d",&a,&b)!=EOF){ sprintf(g2,"%d",a+b); printf("%d\n",strlen(g2)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251662/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 i,previous,next; char input[256],sum[256]; char* p; while(fgets(input, sizeof(input),stdin)) { sscanf(input,"%d %d\n",&previous,&next); sprintf(sum, "%d", previous + next); printf("%d\n",strlen(sum)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251712/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251712/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(void) { int a,b; while (scanf("%d %d",&a,&b)!=EOF){ printf("%d\n",(int)log10(a+b)+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251756/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251756/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 argc, const char * argv[]){ int num,num2,num3; // int i; int count = 1; while(scanf("%d %d",&num,&num2) != -1){ num3 = num + num2; // printf("%d\n",num3); // printf("%d\n",count); while((num3 / 10) >= 1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251813/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; int c, i; while(scanf("%d %d", &a, &b) != EOF) { c = a + b; i=0; while(c!=0) { c = c / 10; i++; } printf("%d\n", i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251857/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 max(int a, int b) { return a > b ? a : b; } int main() { int x,y,z,i,j,k,a,b,c,n,m,t,red[110],blue[110]; scanf("%d",&t); while(t--) { a = b = 0; i = j = 0; scanf("%d",&n); for(x = 0; x < n; x++) { scanf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25190/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25190/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> void enqueue(int); void dequeue(void); int Process_time[1000000]; char Process_name[100000][11]; int Process[100000]; int head=0,tail=1; int main(){ int i,j,time; int total_time = 0; int Process_number; scanf("%d %d",&Process_number,&time); for( ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251943/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" @head = dso_local local_unn...
#include <stdio.h> #include <string.h> #define LEN 100005 /*?§????????????????*/ typedef struct pp { char name[100]; int t; } P; //????????¨???????????????????????????P??¨????????????????????? P Q[LEN]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail = (tail+1) %LEN; } P dequeue(){ P x =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251994/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 LEN 100005 int min(int a, int b) {return a < b ? a : b;} typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ Q[tail] = x; if ( tail == LEN ) tail = 1; else tail++; } P dequeue(){ P x = Q[head]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252036/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> int jia(int a[],int n) { int sum=0; int max=0; for(int i=0;i<=n;i++) { sum=0; for(int j=0;j<=i;j++) { sum=sum+a[j]; } if(sum>max) max=sum; } return max; } int main(int argc, const char * argv[]) { int t,n,m; int suma...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25208/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> #define LEN 100005 typedef struct pp{ char name[10]; int t; }P; void enqueue(P x); P dequeue(); int min(int a, int b){return a < b ? a : b; } P Q[LEN+1]; int head, tail, n; int main(){ int elaps = 0, c; int i, q; P u; scanf("%d %d", &n, &q); head = 1; tail = n ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252122/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 { [10 x i...
#include<stdio.h> #include<string.h> #define N 100000 typedef struct pp{ char name[100]; int time; }Process; int head, tail, n, c=0, q; Process Q[N]; void enqueue(){ Q[head].time = Q[head].time -q; Q[tail] = Q[head]; if(tail > n+1) tail = 0; else tail++; } void dequeue(){ printf("%s %d\n",Q[head].name, Q[hea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252166/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 <stdlib.h> #define MAX 2000000 typedef struct{ char name[10]; int t; } Process; void initialize(void); int isEmpty(void); int isFull(void); void enqueue(Process); Process dequeue(void); int head,tail; Process Q[MAX]; int main(int argc, char const *argv[]) { int n,q; int i; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252209/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.Process = type { [1...
#include <stdio.h> /*#include <string.h>*/ #define LEN 100005 #define MAX 100000 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; } P dequeue(){ P x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a, i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252252/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> #include<stdlib.h> #define N 100000 typedef struct que{ char name[10]; int num; }que; int main(void){ int i,n,q,sum=0,head,tail; que Q[N]; scanf("%d %d",&n,&q); if(n>N||n<=0) exit(1); for(i=1;i<=n;i++){ scanf("%s",Q[i].name); scanf("%d",&Q[i]....
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252302/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252302/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.que = type { [10 x ...
#include<stdio.h> #define MAX 100005 typedef struct{ char name[100]; int t; }P; int head , tail, n; P queue[MAX]; void enqueue(P x) { queue[tail] = x; tail = ( tail + 1 ) % MAX; } P dequeue() { P x = queue[head]; head = ( head + 1 ) % MAX; return x; } int main() { int q, i, tmp, tim...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252353/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252353/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 QUEUE_DATA_MAX 100000 typedef struct ST_QueueData QueueData_t; struct ST_QueueData{ char name_buff[10]; /* Name Buffer */ int time_buff; /* Time Buffer */ QueueData_t *next; /* Next Point */ }QUEUE_DATA; QueueData_t tQueueDataBuffer[QUEUE_DATA_M...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252397/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252397/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.ST_QueueData = type...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main(){ int n, soma = 0, soma2 = 0, soma3 = 0; scanf("%d", &n); char x[n][101]; for (int i = 0; i < n; ++i){ scanf("%s", x[i]); } for (int i = 0; i < n; ++i){ if (strlen(x[i])%2 != 0){ pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25244/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25244/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> #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; } P dequeue(){ P x=Q[head]; head = (head+1)%LEN; return x; } int min(int a,int b){return a<b?a:b;} int main(){ int elap...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252483/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 LEN 100000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN]; int top,tail,n; void enq(P x){ Q[tail]=x; tail=(tail+1)%LEN; } P deq(){ P x=Q[top]; top=(top+1)%LEN; return x; } int min(int a,int b){ return a<b ? a:b; } int main(){ int k=0; int c;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252533/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> #include <stdlib.h> #define LEN 1000000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; P u[LEN+1]; int head, tail, n; int isEmpty(){ if( head ==tail) return 1; else return 0; } void enqueue(P x){ Q[tail] = x; tail++; } void initialize(){ head = 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252584/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252584/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<stdlib.h> #include<string.h> #define MAX 100005 typedef struct pp{ char name[100]; int t; }P; P Q[MAX+1]; int head=1, tail=0, n; int isEmpty(int head, int tail){ if(head == tail) return head; else return -1; } int isFull(int head, int tail){ if(head == (tail+1)%MAX) return head;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252627/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252627/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> #define MAX_N 1010 typedef struct _Elm { char name[11]; int time; } Elm; Elm que[MAX_N]; int main() { int n, q, i, cnt, time, t; scanf("%d %d", &n, &q); for(i = 0; i < n; ++i) { scanf(" %s %d", que[i].name, &(que[i].time)); } for(i = 0, cnt = 0, time = 0; cnt < n; i = (i+1)%n) {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252678/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252678/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._Elm = type { [11 x...
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN]; int head=0, tail, n; void enqueue(P x){ strcpy(Q[tail].name,x.name); Q[tail].t = x.t; tail++; if(tail == LEN){ tail = 0; } } int main(){ int elaps = 0; int i, q; P u; scanf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252735/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> #define N 1000000 int que[N],l,r; void push(int x){ que[r]=x; r++; if(r>=N) r=0; } int pop(){ int d=que[l]; l++; if(l>=N) l=0; return d; } int main(){ l=r=0; int n,q,i; scanf("%d%d",&n,&q); char ch[n][10]; int c[n]; for(i=0; i<n; i++) { scanf("%s %d",ch[i],&c[i]); p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252779/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" @que = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #define MAX 100005//c语言用define来宏定义,不要用c++习惯的const int typedef struct pp{//千万不要少了前面的typedef关键字 char name[100];//task name int t;//task }p; p Q[MAX];//有了这个结构体数组就能很方便的将任务名和任务对应存入了 int head,tail; /* //判断栈空 int isEmpty() { return head==tail; //如果定义成bool类型要预编译调用c标准库里的布尔函数 } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252821/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252821/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 <stdlib.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; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a, int b) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252865/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252865/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 LEN 100000 typedef struct p{ char name[10]; int time; }P; P Q[LEN+1]; int head, tail, n; //キューへの挿入 void enqueue(P x){ Q[tail] = x; tail = (tail + 1)%LEN; } //キューからの取り出し P dequeue(void){ P x = Q[head]; head = (head + 1)%LEN; return x; } int min(int a, int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252908/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252908/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 { [10 x i8...
#include <stdio.h> #include <string.h> #define LEN 1000005 typedef struct qq{ char name[10]; int t; }queue; queue Q[LEN]; int head, tail, n; void enqueue(queue x){ Q[tail] = x; tail = (tail + 1) % LEN; } queue dequeue(){ queue x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a, int b) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252951/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252951/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.qq = type { [10 x i...
#include <stdio.h> typedef struct{ char name[10]; int time; }Rrobin; Rrobin dequeue(void); void enqueue(Rrobin); int head, tail, n; Rrobin queue[100000]; int main(){ int q, i, count=0, total=0; Rrobin a; scanf("%d%d", &n, &q); for(i=0; i<n; i++){ scanf("%s %d", queue[i].name, &queue[i].time); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252995/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.Rrobin = type { [10...
#include<stdio.h> #include<string.h> #define QSIZE 100000 typedef struct list{ char name[100]; int t; }LIST; LIST queue[QSIZE]; int head,tail,n; LIST dequeue(void); void enqueue(LIST); int main(){ int time = 0; int i,q,num; LIST data; head=1; scanf("%d %d",&n,&q); tail=n+1; for(i=1;i<=n;i++){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253037/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.list = type { [100 ...
#include<stdio.h> #include<stdlib.h> #include<string.h> #define NAME_SIZE 10 #define POOL_SIZE 100000 int main(void){ char* name[POOL_SIZE]; int time[POOL_SIZE]; char n_tmp[NAME_SIZE]={}; char n_tmp2[NAME_SIZE]; int t_tmp; int n,q; scanf("%d",&n); scanf("%d",&q); scanf("%s",n_tmp); for(int i=0;i<n;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253080/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 LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(int n)//初期化 { head=0; tail=n+1; } int isEmpty(){//キューが空か判定 if(head == tail) return 0; else return 1; } int isFull()//キューが満杯か判定 { if(head == (tail + 1) % LEN)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253123/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 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; } P dequeue(){ P x=Q[head]; head=(head+1)%LEN; return x; } int min(int a,int b){return a<b?a:b;} int main(void){ int elaps=0,c; int i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253167/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253167/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> int main() { int n; scanf("%d", &n); int i; int u, v; int count[100005]; for (i = 0; i < n; i++) count[i] = 0; for (i = 0; i < n - 1; i++) { scanf("%d %d", &u, &v); count[u - 1]++; count[v - 1]++; } for (i = 0; i < n; i++) { if (count[i] == 2) { printf("NO\n"); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25321/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> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(){ head = tail = 0; } int isEmpty(){ return head == tail; } int isFull(){ return head == (tail + 1) % LEN; } void enqueue(P x){ if(isFull()){ printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253260/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 <stdlib.h> #define LEN 100005 #define EMPTY -1 #define FULL -1 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head=1, tail=1, n; int isFull(); int isEmpty(); void enqueue(P x){ if(isFull()==FULL){ fprintf(stderr,"オーバーフロー\n"); exit(1); } Q[tail]=x; if(ta...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253303/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 LEN 100005 typedef struct pp { char name[100]; int t; }P; P Q[LEN]; int head,tail,n; P dequeue(){ P x; x = Q [head]; head = (head + 1) % LEN; return x; } int min(int a, int b){return a<b ? a : b;} int main(){ int elaps = 0, c; int i, q; P u; P x; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253347/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 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; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a,int b) { return a < b ? ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253390/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> char changer(char c,int k){ for(int i=0;i<k;i++){ if(c!='Z'){ c+=1; } else { c='A'; } } printf("%c",c); } int main(){ int n; char s[10004]; scanf("%d",&n); scanf("%s",s); int l; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253448/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.1 = private unnamed_a...
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main(){ char s[10006]; int n; int m,i; scanf("%d", &n); scanf("%s", s); m = strlen(s); for(i = 0;i < m;i++){ if(s[i] + n > 'Z') s[i] = s[i] - 26 + n; else s[i] = s[i] + n; printf("%c", s[i]); } printf("\n");...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253505/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> char s[10000]; int main() { int x, i, r, a; scanf("%d", &x); scanf("%s", &s); int n = strlen(s); r = x%26; if(r>0) { x = r; } for(i=0; i<n; i++) { a = s[i] + x; if(a>90) s[i] = (a%90) + 64...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253549/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 n; scanf("%d\n", &n); char c; while((c=getchar())!=10){ c+=n; if(c>'Z'){ putchar(c-26); }else{ putchar(c); } } putchar(10); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253592/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253592/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 n; char s[10001]; scanf("%d %s",&n,s); for(int i=0;s[i]!='\0';i++){ if(s[i]+n>'Z'){ s[i]+=n; s[i]-='Z'-'A'+1; } else{ s[i]+=n; } } printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253635/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 rot = 0; char *s,*ans; char c; int i = 0; s = malloc(10002); ans = malloc(10002); scanf("%d\n",&rot); fgets(s,10002,stdin); while(s[i] != '\n'){ c = s[i] + rot; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253686/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253686/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...