Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define N 100 #define IN (1<<21) #define O 0 #define I 1 void dijkstra(void); int n,A[N][N]; int main(){ int i,j,s,u,v,c,k; scanf("%d",&n); for(i=O;i<n;i++){ for(j=O;j<n;j++){ A[i][j]=IN; } } for(i=O;i<n;i++){ scanf("%d%d",&...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222188/source.c" target datalayout = "e-m:e-p270: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<limits.h> #define MAX 100 int ar[MAX][MAX],color[MAX],d[MAX],pi[MAX]; void dijkstra(int,int); int main(){ int n,m,i,j,s,t,num; for(i=0;i<MAX;i++){ for(j=0;j<MAX;j++){ ar[i][j]=1000000; } } scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d",&num,&m); for(j=0;j<m;j++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222230/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ar = dso_local local_unnam...
#include<stdio.h> #define N 100 #define MAX 1000000 #define W 0 #define Gr 1 #define B 2 int n,G[N][N],ws,way[N],iro[N]; int saitan(); int main(){ int i,j,l,tar,k,v,c; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d",&tar,&k); way[i]=MAX; iro[i]=W; for(l=0;l<n;l++) G[i][l]=MAX; for(j=0;j<k;j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222274/source.c" target datalayout = "e-m:e-p270: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 MAX 9 int main(void) { int n, cnt, limit; int x, y, v; int result[MAX][MAX]; int test_cnt; test_cnt = 0; while(scanf("%d", &n), n) { limit = n - 1; cnt = 1; x = y = 0; result[0][0] = cnt; while(n != 1) { if(x == limit) { v = -1; result[++y][x] = ++cnt; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222317/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222317/source.c" target datalayout = "e-m:e-p270: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) { char a[15],b[15],c[15]; int x,y; scanf("%s %s %d %d %s",&a,&b,&x,&y,&c); if((strcmp(a,c)==0)) x--; if((strcmp(b,c)==0)) y--; printf("%d %d",x,y); return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222368/source.c" target datalayout = "e-m:e-p270: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> #include<string.h> #include<stdbool.h> #include<assert.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define INF (1LL<<60) #defin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222418/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222418/source.c" target datalayout = "e-m:e-p270: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){ char S[11],T[11],U[11]; int A,B,i,j; scanf("%s %s",S,T); scanf("%d %d",&A,&B); scanf("%s",U); if(strcmp(S,U)==0){ printf("%d %d\n",A-1,B); } if(strcmp(T,U)==0){ printf("%d %d\n",A,B-1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222469/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222469/source.c" target datalayout = "e-m:e-p270: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 <memory.h> #include <ctype.h> #include <stdlib.h> #include <string.h> int main(void){ char s[256], t[256]; int a, b; char u[256]; scanf("%s %s", s, t); scanf("%d %d", &a, &b); scanf("%s", u); if (strcmp(t,u)){ a = a - 1; } else{ b = b - 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222533/source.c" target datalayout = "e-m:e-p270: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> void main() { char s[10],t[10],u[10]; int m,n; scanf("%s %s",s,t); scanf("%d %d",&m,&n); scanf("%s",u); if(strcmp(u,s)==0) printf("%d %d",m-1,n); else printf("%d %d",m,n-1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222599/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222599/source.c" target datalayout = "e-m:e-p270: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) { char S[11]; char T[11]; char U[11]; int A; int B; scanf("%s %s", S, T); scanf("%d %d", &A, &B); scanf("%s", U); if (strcmp(S, U) == 0) A -= 1; else if (strcmp(T, U) == 0) B -= 1; printf("%d %d\n", A, B); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222641/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222641/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> #define ll long long #define N 100000 const int MOD = 1000000007; int main(void) { char a[50] = { "\0" }, b[50] = { "\0" }; char c[50] = { "\0" }; int a1 = 0, b1 = 0; scanf("%s %s", a, b); scanf("%d %d", &a1, &b1); scanf("%s", c); if (!strcmp(a, c)) { a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222692/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MOD = dso_local local_unna...
#include <inttypes.h> #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { intmax_t A, B; char S[11], T[11], U[11]; intmax_t ans = 0; scanf("%s%s", S, T); scanf("%jd%jd", &A, &B); scanf("%s", U); if (strcmp(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222735/source.c" target datalayout = "e-m:e-p270: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 mysqrt(int n) { int left,right; long long mid; if(n==0)return 0; if(n<0)return -1; left=1;right=n; while(left<=right) { mid=(left+right)/2; if(mid*mid==n)return mid; else if(mid*mid<n)left=mid+1; else right=mid-1; } return left-1; } int main(void) { int query; int max; int su...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222779/source.c" target datalayout = "e-m:e-p270: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); int i, j; int a[1003][1003]; for (i = 0; i < n; i++) { for (j = 0; j < n - 1; j++) { scanf("%d", &a[i][j]); a[i][j]--; } } int ans = 0; int p[1003]; for (i = 0; i < n; i++) p[i] = 0; int c; int count = 0; int r[1003]; while (count < n * ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222843/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222843/source.c" target datalayout = "e-m:e-p270: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); int k = 0; int x = 0; while(x < n){ x += 1000; k += 1; } printf("%d\n", 1000 * k - n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222894/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(){ int N,x=0,y=0; scanf("%d",&N); if(N % 1000 != 0){ x = N / 1000; x+=1; y = (x*1000) - N;} else{ y = 0; } printf("%d",y); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222937/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222937/source.c" target datalayout = "e-m:e-p270: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); while (n > 0) { n -= 1000; } printf("%d\n", n * -1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222980/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222980/source.c" target datalayout = "e-m:e-p270: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, o; scanf("%d", &n); if(n % 1000==0){ o = 0; }else{ o = ((n/1000)+1)*1000-n; } printf("%d\n", o); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223022/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223022/source.c" target datalayout = "e-m:e-p270: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); int r = n % 1000; if(r == 0){ printf("%d",r); } else{ int f = 1000 - r; printf("%d",f); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223066/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223066/source.c" target datalayout = "e-m:e-p270: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%1000)!=0){ printf("%d\n",1000-(N%1000)); } else{ printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223109/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223109/source.c" target datalayout = "e-m:e-p270: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, ans=0; scanf("%d", &n); if(n%1000){ ans = 1000-(n%1000); } printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223152/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223152/source.c" target datalayout = "e-m:e-p270: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,i; scanf("%d",&N); if(N<1000) { printf("%d\n",1000-N); return 0; } for(i=1;i<=10;i++){ if(i*1000>=N){ printf("%d\n",i*1000-N); return 0; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223196/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223196/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> void main() { int N,l,change; scanf("%d",&N); l=N%1000; change=1000-l; if(l!=0){ printf("%d\n",change); } if(l==0){ printf("%d",0); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223246/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223246/source.c" target datalayout = "e-m:e-p270: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,k1000,A; scanf("%d",&N); k1000 = N/1000*1000; //1000の位 A = N - k1000; //1000の位を外した値(100の位以下の数字だけ) if(A == 0){ printf("%d\n",A); } else{ printf("%d\n",1000 - A); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223303/source.c" target datalayout = "e-m:e-p270: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 money; char str[256]; fgets(str, 256, stdin); money = atoi(str) % 1000; if(money != 0){ money = 1000 - money; } printf("%d",money); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223347/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> int main() { int N; int otsuri = 0; scanf("%d", &N); otsuri = 1000 - N; while (otsuri < 0) { otsuri = otsuri + 1000; } printf("%d\n", otsuri); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223390/source.c" target datalayout = "e-m:e-p270: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; if (scanf("%d", &N) != 1) return 1; printf("%d\n", N % 1000 == 0 ? 0 : 1000 - (N % 1000)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223433/source.c" target datalayout = "e-m:e-p270: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); n=n%1000; if (n>0) printf("%d\n",1000-n); else puts("0"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223477/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223477/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int n = 0; scanf("%i",&n); int value = 0; long long int sum =0; int min = 999999999; for (int i = 0;i<n;i++) { scanf("%i",&value); sum = sum + value; if (value < min && value%2 != 0) min = value; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22352/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22352/source.c" target datalayout = "e-m:e-p270: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 sum = 0; int a,b,c,d,e,f; scanf("%d %d %d %d %d %d",&a,&b,&c,&f,&d,&e); sum = a + b*5 + c*10+f*50 + d*100+e*500; // printf("sum = %d\n",sum); if(sum >= 1000) printf("1\n"); else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223563/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223563/source.c" target datalayout = "e-m:e-p270: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 sum=0, c1,c5,c10,c50,c100,c500; scanf("%d %d %d %d %d %d",&c1,&c5,&c10,&c50,&c100,&c500); sum+=c1*1+c5*5+c10*10+c50*50+c100*100+c500*500; if(sum<1000)printf("0\n"); else printf("1\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223606/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223606/source.c" target datalayout = "e-m:e-p270: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 <inttypes.h> int main(void){ int n; scanf("%d", &n); uint64_t min_un_even = 0; uint64_t tmp; uint64_t sum = 0; for(int i = 0; i < n; i++){ scanf("%" PRIu64, &tmp); sum += tmp; if((!min_un_even || min_un_even > tmp) && (tmp % 2)) min_un_even = tmp; } if(sum % 2) sum -= min...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22365/source.c" target datalayout = "e-m:e-p270: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 c1,c5,c10,c50,c100,c500; scanf("%d %d %d %d %d %d",&c1,&c5,&c10,&c50,&c100,&c500); if(c1+c5*5+c10*10+c50*50+c100*100+c500*500>=1000)printf("1\n"); else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223693/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223693/source.c" target datalayout = "e-m:e-p270: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 p,m,c; scanf("%d%d%d",&p,&m,&c); printf("%d\n",p+m+c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223736/source.c" target datalayout = "e-m:e-p270: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,a[1000000],i;long long s=0,min=10000000000; scanf("%d",&n); for(i=0;i<n;i++) {scanf("%d",&a[i]);s+=a[i];if(a[i]%2!=0&&a[i]<=min)min=a[i];} if(s%2==0)printf("%lld",s); else printf("%lld",s-min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22378/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22378/source.c" target datalayout = "e-m:e-p270: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 p,m,c,sum=0; scanf("%d %d %d",&p,&m,&c); sum=p+m+c; printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223822/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223822/source.c" target datalayout = "e-m:e-p270: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 s=0,n,i,k,a,b,c; scanf("%lld %lld",&n,&k); if(k==0){ printf("%lld\n",n*n); return 0; } for(i=k+1;i<=n;i++){ a=i-k; b=(n+1)/i; c=b*i; c=n-c-k+1; s+=a*b; if(c>0)s+=c; //printf("%lld %lld %lld %lld\n",i,a,b,c); } printf("%lld\n",s); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_223873/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_223873/source.c" target datalayout = "e-m:e-p270: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 w1,h1,w2,h2; scanf("%d%d%d%d", &w1,&h1,&w2,&h2); int n = 2*(h2+1)+w2; int m = 2*(h1+1)+w1; n = n+m+w1-w2; printf("%d\n", n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22396/source.c" target datalayout = "e-m:e-p270: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 count(int turi); int main(void) { int n; int ans; while (1){ scanf("%d", &n); if (n == 0){ return (0); } n = 1000 - n; ans = count(n); printf("%d\n", ans); } } int count(int turi) { int i = 5; int koin[6] = {1, 5, 10, 50, 100, 500}; int count = 0; while (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224009/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224009/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c[100],i,n; scanf("%d",&b) ; i=0; while(b != 0){ a=1000-b; c[i]=0; c[i]+=a/500; a=a%500; c[i]+=a/100; a=a%100; c[i]+=a/50; a=a%50; c[i]+=a/10; a=a%10; c[i]+=a/5; a=a%5; c[i]+=a/1; i+=1; scanf("%d",&b) ; } for(n=0;n<i;n++){ printf("%d\n",c[n]); } retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224052/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224052/source.c" target datalayout = "e-m:e-p270: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 _500=0, _100=0, _50=0, _10=0, _5=0, _1=0; while(1) { scanf("%d", &b); if(b == 0) { break; } a = 1000 - b; _500=0, _100=0, _50=0, _10=0, _5=0, _1=0; _500 = a / 500; a -= 500 * _500; _100 = a / 100; a -= 100 * _100; _50 = a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224096/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224096/source.c" target datalayout = "e-m:e-p270: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 NUM_OF_MONEY_TYPE ( 6 ) int moneyType[ NUM_OF_MONEY_TYPE ] = { 500, 100, 50, 10, 5, 1 }; int getNumOfChange( int change ); int main( void ) { int change; int money; while( scanf("%d", &money), money ) { change = 1000 - money; printf( "%d\n", getNumOfChange( change ) ); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224146/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224146/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @moneyType = dso_local loca...
#include <stdio.h> #include <string.h> #include <math.h> int main() { int n, i,j,a; scanf("%d",&n); int number[n]; for (i=0; i<n;i++) { scanf("%d",&number[i]); } for (i = 0; i < n; ++i) { for (j = i + 1; j < n; ++j) { if (number[i] > number[j]) { a = number[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22419/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22419/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a+b==c||a+c==b||b+c==a){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224232/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224232/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); if(a+b == c||a+c == b||b+c == a) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224276/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224276/source.c" target datalayout = "e-m:e-p270: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, char const *argv[]) { int a,b,c; int flag=0; scanf("%d %d %d",&a , &b, &c ); if( (a == b + c) || (b==a+c) || (c==a+b)) flag = 1; if(flag==1){ puts("Yes"); }else{ puts("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224319/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224319/source.c" target datalayout = "e-m:e-p270: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; scanf("%d%d%d",&a,&b,&c); if(a+b==c||a+c==b||c+b==a) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224362/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224362/source.c" target datalayout = "e-m:e-p270: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,s; scanf("%d%d%d",&a,&b,&c); s=(a+b+c)/2 + ((a+b+c)%2)*100; puts((s-a)*(s-b)*(s-c)?"No":"Yes"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224405/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224405/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a, b, c; scanf("%d%d%d", &a, &b, &c); if (a == b+c || b == c+a || c == a+b) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224449/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224449/source.c" target datalayout = "e-m:e-p270: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; scanf ("%d %d %d", &a, &b, &c); if (a + b == c || b + c == a || c + a == b ) printf ("Yes"); else printf ("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224492/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224492/source.c" target datalayout = "e-m:e-p270: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; scanf("%d %d %d",&a,&b,&c); if(a==b+c||b==a+c||c==a+b){ puts("Yes"); }else{ puts("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224535/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224535/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int A,B,C; scanf("%d%d%d",&A ,&B ,&C); if((A<C&&C<B)||(B<C&&C<A)){ printf("Yes"); } else { printf("No"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224586/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224586/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a, b, c; scanf("%d %d %d", &a, &b, &c); if ((a<c && c<b) || (b<c && c<a)){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224629/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224629/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a <= c && b >= c || a >= c && b <= c) printf("Yes"); else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224672/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224672/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b){ if(a<c&&c<b){ printf("Yes\n"); } else{ printf("No\n"); } } else{if(b<c&&c<a){ printf("Yes\n"); } else{ printf("No\n"); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224715/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224715/source.c" target datalayout = "e-m:e-p270: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; scanf("%d %d %d",&a,&b,&c); if((c > a && c < b) || (c < a && c > b)){ printf("Yes"); } else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224759/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224759/source.c" target datalayout = "e-m:e-p270: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 <float.h> #include <inttypes.h> #include <limits.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #ifdef __cplusplus #include <bits/stdc++.h> #endif int32_t nextint(void){ char c=getchar_unlocked(); w...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224809/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224809/source.c" target datalayout = "e-m:e-p270: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> int main() { long int a,b,c,d,r; scanf("%ld %ld %ld %ld",&a,&b,&c,&d); r=(b+d)*2; r=r+a+c; r=r+(a-c); r=r+4; printf("%ld\n",r); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22486/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22486/source.c" target datalayout = "e-m:e-p270: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 N; scanf("%d",&N); long long march[5]={0,0,0,0,0}; for(int i=0;i<N;i++){ char name[11]; scanf("%s",name); switch(name[0]){ case 'M': march[0]++; break; case 'A': march[1]++; break; case 'R': march[2]++; break; case 'C': march[3]++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224902/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224902/source.c" target datalayout = "e-m:e-p270: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(void){ int n; char s[100000][20]; int i,j,k; long int counta[5]; long int ans=0; for(i=0;i<5;i++){ counta[i]=0; } //read input scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",s[i]); if(s[i][0]=='M'){ counta[0]++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224953/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224953/source.c" target datalayout = "e-m:e-p270: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; int next; int end = 0; char line[4]; char board[3][3]; while(1){ next = 0; for(i = 0; i < 3; i++){ scanf("%s",line); if(line[0] == '0'){ end = 1; break; } board[0][i] = line[0]; board[1][i] = line[1]; board[2][i] = line[2]; } if(end){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224997/source.c" target datalayout = "e-m:e-p270: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 h = 0; int w = 0; int ch = 0; int cw = 0; while(1){ scanf("%d %d",&h,&w); if((h == 0)&&(w == 0)){ break; } for(ch = 0;ch < h;ch++){ if(ch % 2 == 0){ for(cw = 0;cw < w;cw++){ if(cw % 2 == 0){ printf("#"); }else{ printf("."); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225046/source.c" target datalayout = "e-m:e-p270: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 H, W; int i, j; for (;;){ scanf("%d %d", &H, &W); if (H == 0 && W == 0){ break; } for (i = 0; i <H; i++){ for(j = 0; j < W; j++){ if ((i + j) % 2 == 0){ printf("#"); } else { printf("."); } } printf("\n"); } printf("\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225097/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225097/source.c" target datalayout = "e-m:e-p270: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> char str[110]; int alp[26]; int main() { int n,i,j,flag; for(i=0;i<26;i++) alp[i]=0; scanf("%d",&n); scanf("%s",str); for(i=0;i<n;i++) { char ch = str[i]; if(ch>='a'&& ch<='z') { alp[ch-'a']++; } e...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22514/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22514/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @alp = dso_local local_unname...
/* 整数を2つ入力し、それらを縦・横として枠を描け。 前問で描いた長方形のプログラムを、if文で書くものを変えるとよい。 やり方: ・長方形のを流用。 ・一行目または最終行の時のみ、全て「#」。 ・それ以外は、最初と最後の文字のみ「#」。他は「.」。 結果:正解。 */ #include <stdio.h> #include <math.h> #include <string.h> #include <ctype.h> int main() { int n=0; int h,w,count=0; int i[100],k[100]; while(1){ scanf("%d %d",&i[n],&k[n])...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225183/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225183/source.c" target datalayout = "e-m:e-p270: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 h, w; int i, j; while (1) { scanf("%d %d", &h, &w); if (h == 0 && w ==0) break; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { if (i % 2) { if (j % 2) { putchar('#'); } else { putchar('.'); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225233/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225233/source.c" target datalayout = "e-m:e-p270: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 h; int w; int i,j; while(1){ scanf("%d %d", &h, &w); if (h == 0 && w == 0){ break; } for (i = 0; i < h; i++){ for (j = 0; j < w; j++){ if (i % 2 == 0){ if(j % 2 == 0){ printf("#"); } else { printf("."); } } else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225277/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225277/source.c" target datalayout = "e-m:e-p270: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 h, w, i1, i2; while (1){ scanf("%d %d", &h, &w); if (h == 0 && w == 0){ break; } else { for (i1 = 0; i1 < h; i1++){ for (i2 = 0; i2 < w; i2++){ if ((i2+i1) % 2 == 0){ printf("#"); } else { printf("."); } } print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225341/source.c" target datalayout = "e-m:e-p270: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> typedef long long ll; int compare_string(const void *a, const void *b) { return strcmp(*(const char **)a, *(const char **)b); } int main() { int N; scanf("%d", &N); int p[N]; char s[N][11]; char **str; str = (char**)malloc(sizeof(char*) * N); int i ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225385/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225385/source.c" target datalayout = "e-m:e-p270: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> typedef struct{ char s[11]; int p; int num; } house; int cmp(const void *a, const void *b){ return ((house *)b)->p - ((house *)a)->p; } int scmp(const void *a, const void *b){ return strcmp(((house *)a)->s, ((house *)b)->s); } int ma...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225442/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225442/source.c" target datalayout = "e-m:e-p270: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.house = type { [11 ...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char const *argv[]) { int N, p[100], i,swap,j,key[100],k; char S[100][11], tmp[11]; scanf("%d\n", &N); for (i = 0; i < N; i++) { scanf("%s ", S[i]); scanf("%d\n", &p[i]); } for (i = 0; i < N; i++) { key[i] = i+1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225493/source.c" target datalayout = "e-m:e-p270: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){ char s[20]; scanf("%s", s); s[5]=' '; s[13]=' '; printf("%s", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225536/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225536/source.c" target datalayout = "e-m:e-p270: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() { char s[20]; scanf("%s", s); s[5] = s[13] = ' '; printf("%s\n", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225587/source.c" target datalayout = "e-m:e-p270: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 () { char vet[25]; scanf(" %s", vet); vet[5]=' '; // se você botar duas aspas significa que vc está dando uma string como argumento para uma casa só vet[13]= ' '; // uma string nao consegue ficar dentro de uma casa só for (int k=0; k<19; k++) { printf("%c", vet[k]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225637/source.c" target datalayout = "e-m:e-p270: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[20],s1[20]; int i,count=0,len; scanf("%s",s); len=strlen(s); for(i=0;i<len;i++) { if(s[i]==',') { s1[i]=' '; count++; } else { s1[i]=s[i]; } } for(i=0;i<strle...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225680/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225680/source.c" target datalayout = "e-m:e-p270: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){ char s[20]; scanf("%s",&s); s[5]=' '; s[13]=' '; printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225752/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225752/source.c" target datalayout = "e-m:e-p270: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(){ char a[19]; scanf("%s",a); a[5]=' '; a[13]=' '; printf("%s\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225802/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225802/source.c" target datalayout = "e-m:e-p270: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, char **argv) { char s1[8], s2[8], s3[8]; scanf("%[^,],%[^,],%[^,]", s1, s2, s3); printf("%s %s %s\n", s1, s2, s3); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225853/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225853/source.c" target datalayout = "e-m:e-p270: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(void) { int i; char s[20]; scanf("%s", s); for (i = 0; i < 19; i++) { if (i == 5 || i == 13) { printf(" "); continue; } printf("%c", s[i]); } printf("\n"); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225910/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225910/source.c" target datalayout = "e-m:e-p270: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,d,e; A>=0&&A<=10e9; B>=0&&B<=10e9; C>=0&&C<=10e9; scanf("%d",&A); scanf("%d",&B); scanf("%d",&C); e=A+B; if( A>=C||e>=C ){ d=B+C; printf("%d",d); } else{ d=A+B*2+1; printf("%d",d); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225954/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225954/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b,c,max; scanf("%d %d %d",&a,&b,&c); //2連続で毒入り食べると死 if(a+b>=c) max=b+c; else max=a+2*b+1; printf("%d",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226003/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226003/source.c" target datalayout = "e-m:e-p270: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 NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};} //pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ #define INFTY 999999 int main(void){ unsigned long a,b,c; scanf("%lu %lu %lu", &a, &b, &c); unsigned long ans; //もし毒入りクッキーよ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226047/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226047/source.c" target datalayout = "e-m:e-p270: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 s[30],n,i; s[0]=1; s[1]=2; s[2]=4; for(i=3;i<30;i++) s[i]=s[i-1]+s[i-2]+s[i-3]; while(1){ scanf("%d",&n); if(!n)break; printf("%d\n",s[n-1]/3650+(s[n-1]%3650?1:0)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226090/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226090/source.c" target datalayout = "e-m:e-p270: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, C, p , S; int ans; scanf("%d%d", &N, &C); for(S = 0; C > 0; C--){ scanf("%d", &p); S += p; } ans = S / (N + 1); if (S % (N + 1)) ans++; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226184/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226184/source.c" target datalayout = "e-m:e-p270: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, H, W; scanf("%d%d%d", &N, &H, &W); printf("%d", (N-H+1)*(N-W+1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226227/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226227/source.c" target datalayout = "e-m:e-p270: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 h, n, w; scanf("%d", &n); scanf("%d", &h); scanf("%d", &w); printf("%d\n", (n - h + 1) * (n - w + 1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226292/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226292/source.c" target datalayout = "e-m:e-p270: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 cmp(const void *a,const void *b) { int *c,*d; c=(int *)a; d=(int *)b; return *c-*d; } int main() { int i,j,k,n,m,flag=0,v_min,v_max; int a[105],b[105]; scanf("%d%d",&n,&m); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<m;i++) scanf("%d",&b[i]); qsort(a,n,sizeof(int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22635/source.c" target datalayout = "e-m:e-p270: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> #define lop(i, n) for(i=0; i<n; i++) int main() { int i, n, cnt=0, p[20]; scanf("%d", &n); lop(i, n){ scanf("%d", &p[i]); } for(i=1; i<n-1; i++){ if(p[i-1]<p[i]&&p[i]<p[i+1]){ cnt++; } else if(p[i-1]>p[i]&&p[i]>p[i+1]){ cnt++; } } printf("%d", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226393/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226393/source.c" target datalayout = "e-m:e-p270: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 <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <limits.h> #include <math.h> #include <assert.h> typedef int64_t ll; typedef uint64_t ull; int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */ int des(const void *a, const void *b)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226436/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226436/source.c" target datalayout = "e-m:e-p270: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 LENGTH 20 int main() { int p[LENGTH]; int n; int result; int i; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &p[i]); } for (i = 0; i < n - 2; i++) { if ((p[i + 1] < p[i] && p[i + 1]> p[i + 2]) || (p[i + 1] > p[i] && p[i + 1] < p[i + 2])) result++; } printf("%d", re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226487/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226487/source.c" target datalayout = "e-m:e-p270: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 n,m,max=0,min=0; scanf("%ld%ld",&n,&m); if(n==0 && m==0) {printf("0 0\n"); return 0;} if(n==0 && m!=0) {printf("Impossible\n"); return 0;} if(n!=0 && m==0) {printf("%ld %ld\n",n,n); return 0;} if(m<=n) { min=n; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22653/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22653/source.c" target datalayout = "e-m:e-p270: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 n,i,count=0; int a[20]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=1;i<n-1;i++){ if(a[i-1] < a[i] && a[i+1] < a[i]); else if(a[i-1] > a[i] && a[i+1] > a[i]); else count++; } printf("%d\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226573/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226573/source.c" target datalayout = "e-m:e-p270: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 getAns(int, int a[]); int main() { int n; int p[20] = {0}; scanf("%d", &n); for (int i = 0; i < n - 1; i++) { scanf("%d ", p + i); } scanf("%d", p + n - 1); printf("%d", getAns(n, p)); return 0; } int getAns(int n, int p[]) { int count = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226616/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226616/source.c" target datalayout = "e-m:e-p270: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,t,k,d; scanf("%d %d %d %d",&n,&t,&k,&d); int time1=t*((n-1)/k+1); if(time1-d>t) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22666/source.c" target datalayout = "e-m:e-p270: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 n; int p[20]; int count; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &p[i]); } count = 0; for (int i = 1; i < n - 1; i++) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) { count++; } else if (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226702/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226702/source.c" target datalayout = "e-m:e-p270: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,D; scanf("%d%d%d%d",&A,&B,&C,&D); if((A+B)>(C+D)) { printf("Left\n"); } else if((A+B)<(C+D)) { printf("Right\n"); } else { printf("Balanced\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226746/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226746/source.c" target datalayout = "e-m:e-p270: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 ceilnk,ceildt,n,k,t,d; scanf("%d %d %d %d",&n,&t,&k,&d); ceilnk = n%k==0 ? n/k : (n/k)+1; ceildt = d%t==0 ? d/t : (d/t)+1; if((ceilnk-1 > ceildt) || (ceilnk-1 == ceildt && d % t!=0)) printf("YES\n"); else printf("NO\n"); return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22679/source.c" target datalayout = "e-m:e-p270: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 a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); if(a+b==c+d) {printf("Balanced");} else if(a+b>c+d) {printf("Left");} else {printf("Right");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226832/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226832/source.c" target datalayout = "e-m:e-p270: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,D,left=0,right=0; scanf("%d %d %d %d",&A,&B,&C,&D); left=A+B; right=C+D; if(left>right){ printf("Left\n"); } else if(left==right){ printf("Balanced\n"); } else{ printf("Right...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226883/source.c" target datalayout = "e-m:e-p270: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,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a+b==c+d){ printf("Balanced\n"); }else if(a+b>c+d){ printf("Left\n"); }else{ printf("Right\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226926/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226926/source.c" target datalayout = "e-m:e-p270: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...