Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<string.h> int main (){ char a[100010]; int i,j,k,l,st,flag=0,once=0; scanf("%s",a); l=strlen(a); for(i=0;i<l;i++) { if((a[i]-'0')%2==0) { if(a[l-1]-'0' > a[i]-'0') { char temp=a[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_65824/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_65824/source.c" target datalayout = "e-m:e-p270:32:32-p271: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) { // your code goes here int a[4][4],i,j,k=0,count=0,ped[4]; for(i=0;i<4;i++) { for(j=0;j<4;j++) { scanf("%d",&a[i][j]); } if(a[i][3]==1) { count++; ped[k]=i; k++; } } k=0; while(count) { if((a[(ped[k]+1)%4][0]==1)||(a[(ped[k]+2)%4][1]==1)||(a[(p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_65882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_65882/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 findmax(int *a,int s,int n); void mergsort(int a[],int t[],int size,int n); void merg(int a[],int t[],int l1,int u1,int l2,int u2); void copy(int a[],int t[],int n); int min(int a,int b) { if(a<b) return(a); else return(b); } int main() { int l,i; scanf("%d",&l); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_65925/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_65925/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 t; int n, k; scanf("%d", &t); for (int i = 0; i < t; ++i) { scanf("%d %d", &n, &k); if (k > n) { printf("%d\n", k - n); } if (k == n) { printf("0\n"); } if (k < n) { if (n % 2 == 0) { if (k % 2 == 0) { printf("0\n"); } e...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_65969/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_65969/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> char *matrix[] = { "111111101010101111100101001111111", "100000100000000001010110001000001", "101110100110110000011010001011101", "101110101011001001111101001011101", "101110101100011000111100101011101", "100000101010101011010000101000001", "111111101010101010101010101111111", "0000000011111...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66018/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66018/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> long long n, m, t, i, y[2000000], x[2000000], b, g, w; char s[100000]; int war(const void* aa, const void* bb) { return(*(long long*)bb-*(long long*)aa); } int main() { scanf("%I64d%I64d", &b, &g); w=0; for(i=0; i<b; i++) { scanf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66076/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { long long int i,j,ans,a,b,c; scanf("%lld%lld%lld",&a,&b,&c); if((b<a&&c>=0)||(b>a&&c<=0)) { printf("NO"); return 0; } if(c==0) { if(a==b) printf("YES"); else printf("NO"); return 0; } j=(b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66126/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66126/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,ans=0,max=0; int a[100]; scanf("%d",&n); for (i=0;i<n;i++){ scanf("%d",&a[i]); if (a[i]>max) max=a[i]; } for (i=0;i<n;i++) { if (a[i]<max) ans+=max-a[i]; } printf("%d\n",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_6617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_6617/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 b[5001],c[10003],q=0; int main(){ int a,t,i,j; scanf("%d", &a); for(i=0;i<a;i++){scanf("%d", &t); b[t]++;} for(i=1;i<=5000;i++)if(b[i] >0){c[q]=i;b[i]--;q++;} if(q>=2)for(i=c[q-2];i>0;i--)if(b[i] > 0) {c[q]=i;q++;} printf("%d\n", q); for(i=0;i<q;i++)printf("%d ", c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66212/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66212/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @q = dso_local local_unnamed_...
#include <stdio.h> #include <stdlib.h> int a[1000+10]; int main() { int i; int n; int s=0,d=0; int flag=0; int temp; int rear,head; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); rear=n-1; head=0; while(head!=rear+1) { if(a[head]>=a[rear]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66270/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66270/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 max(a,b)(a>b?a:b) #define min(a,b)(a<b?a:b) int cmpfunc (const void * a, const void * b) { return ( *(int*)a - *(int*)b ); } int main() { int n,k,a[100],b[100],c[100],i,j; scanf("%d%d",&n,&k); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<k;i++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66357/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66357/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 min(int a,int b); int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); if(d>2*c)printf("-1"); else if(2*d<c)printf("-1"); else if(d>=b)printf("-1"); else printf("%d\n%d\n%d\n",2*a,2*b,2*min(c,d)); return 0; } int min(int a,int b) { if(a>b)return b; else return a; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66414/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 t; scanf("%d",&t); while(t--) { int n,memory[26]={0},i; scanf("%d",&n); int num=n; while(n--) { char str[1001]; scanf("%s",str); getchar(); i=0; while(str[i]!='...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66465/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66465/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,m,n,b,p,x,y,game,i; while(scanf("%d%d%d",&n,&b,&p)!=EOF) { game=0; y=n*p; i=1; x=0; for(;;) { i=1; if(n<=1) break; while(i<=n) { i*=2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66508/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66508/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> int main() { int t; scanf("%d", &t); char s[1003]; int i, n; for (i = 0; i < t; i++) { scanf("%s", s); n = strlen(s); if (s[n - 1] == 'o') printf("FILIPINO\n"); else if (s[n - 1] == 'u') printf("JAPANESE\n"); else printf("KOREAN\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66559/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66559/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; int i; int a13, a12, a23; int temp; scanf("%d", &N); int chicks[N + 1]; printf("? 1 2\n"); fflush(stdout); scanf("%d", &a12); printf("? 1 3\n"); fflush(stdout); scanf("%d", &a13); printf("? 2 3\n"); fflush(stdout); scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66616/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66616/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { long long int n,k; scanf("%I64d %I64d",&n,&k); if(n>k) printf("1"); else { if(k%n==0) printf("%I64d",(k/n)); else if(k%n!=0) printf("%I64d",((k/n)+1)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_6666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_6666/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> typedef long long ll; int main() { int t; scanf("%d",&t); while(t--) { ll a,b, cnt=0; scanf("%lld%lld",&a,&b); if(b>a) { ll req=b-a; cnt=req/10; if(req%10!=0) cnt++; } else if(a>b) { ll req=a-b; cnt=req/10; if(req%10!=0) cnt++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66702/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66702/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 nprintf(x,y) fprintf(file,x,y) int main(){ int n,k,a[105],i,sum=0; FILE *file = fopen("output.txt","w"); freopen ("input.txt","r",stdin); scanf("%d%d",&n,&k); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++){ if(a[i]>=k) a[i] -= k; if(a[i]>=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66768/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66768/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include "stdio.h" #include "stdlib.h" #include "string.h" #include "stddef.h" #include "stdbool.h" const int MAXN = 200005; const int INF = 1e9; const int MOD = 1e9+7; const long long L_INF = 4e18; const long double EPS = 1e-10; bool check(int n, int k, int t, const char* s) { t++; k--; int last = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66818/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66818/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MAXN = dso_local local_unnam...
//#include <iostream> //#include <fstream> //#include <cmath> //#include <algorithm> #include <stdio.h> //#include <vector> //#include <set> //#include <queue> //using namespace std; int n,m,k,mi,p,f,i,j,x,y,z,ma,r,l,ans,a[200001],b[200001],d[200001],d1[200001]; int main() { //ios_base::sync_with_stdio(0); //freopen...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66904/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66904/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main(void) { int mas1[10]; int mas2[10]; int n,m,i,j,min = 100; scanf("%d %d",&n,&m); for(i=0;i<n;i++) { scanf("%d",&mas1[i]); } for(i=0;i<m;i++) { scanf("%d",&mas2[i]); } for(i=0;i<n;i++) { for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_66999/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_66999/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <stdint.h> #include <math.h> int recursion(int n,int sum) { if (n==1) { return sum+1; } else { sum+=4*(n-1); } return recursion(n-1,sum); } int main() { int n,sum=0; scanf("%d",&n); printf("%d",recursion(n,sum)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67040/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67040/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> int main() { int n; scanf("%d",&n); if(n==1) printf("1"); else { n=1+4*(n*(n-1))/2; printf("%d",n); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67084/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67084/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<math.h> #include<time.h> #include<stdio.h> #include<string.h> #include<stdlib.h> #define oo 2100000000 #define pi 3.14159265359 #define zero(a) (abb(a)<=1e-7) #define lowbit(a) ((a)&(-(a))) #define min(a,b) ((a)<(b)?(a):(b)) #define max(a,b) ((a)>(b)?(a):(b)) #define abb(a) ((a)>0?(a):(-(a))) #define cj(x1,y1,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67127/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67127/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @a = dso_local global [100002...
#include <stdio.h> #include <stdlib.h> #include <math.h> int main(){ int t,i; scanf("%d",&t); int n; for(i=0;i<t;++i){ scanf("%d",&n); for(int j=1;j<=n;++j){ if(j==1) printf("9"); else if(j==2) printf("8"); else if(j==3) printf("9"); else if(j>3){ pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67170/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67170/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 solve() { int n; scanf("%d",&n); int i; int str[n]; str[0] = 9; str[1] = 8; for(i=2;i<n;i++) str[i]=(str[i-1]+1)%10; for(i=0;i<n;i++) printf("%d",str[i]); printf("\n"); } int main() { int t; scanf("%d",&t); while(t--) solve(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67213/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67213/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, cont; char str[101]; scanf("%d", &n); scanf("%s", str); cont = 0; for (i = 0; i < n; i++) { if(str[i] == 'B') { cont++; while(str[i] == 'B') { i++; } } } printf("%d\n", cont); for (i = 0; i < n; i++) { cont = 0; if(str[i] == 'B')...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67264/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67264/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> int main(void) { // your code goes here int n; scanf("%d",&n); char a[n]; scanf("%s",&a); int i=0; int x[100]; for(i=0;i<n;i++) x[i]=0; int j=0; int s=0;int k=0; for(i=0;i<n;i++) { if(a[i]==66) k++;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67307/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; int a[300]; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", &a[i]); for (i = 0; i < n; i++) { while (a[i]) { putchar('P'); a[i]--; if (i == 0) { putcha...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67350/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67350/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,k=-1; char s[1000001]; int a[300]; scanf("%d",&n); int i,j,last; for(i=0;i<n;i++)scanf("%d",&a[i]); if(a[0]) { s[++k]='P'; for(j=2;j<=a[0];j++) { s[++k]='R'; s[++k]='L'; s[++k]='P'; } last=0; } for(i=1;i<n;i++) if(a[i]) { for(;last<i;last++)s[++k]='R'; s[++k]='P'; for(j=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67444/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67444/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, high, low, i, j; scanf("%d", &n); for (low = 1, i = 0, high = n*n - n/2 + 1; i < n; i++, low += n/2, high -= n/2) { for (j = 0; j < n/2; j++) { printf("%d %d%c", low+j, high+j, (j == n/2-1 ? '\n' : ' ')); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67488/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67488/source.c" target datalayout = "e-m:e-p270:32:32-p271: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); int to,s[N + 5][N + 5]; to = N*N; int i; int j,t = 1; for(i = 1;i <= N*N;t++) { for(j = 1;j <= N;j++,i++) { s[j][t] = i; } t++; for(j = N;j >= 1;j--,i++) { s[j][t] = i; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67538/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67538/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x1, y1, x2, y2; scanf("%d%d%d%d",&x1,&y1,&x2,&y2); int x, y; scanf("%d%d",&x,&y); if((x2-x1)%x == 0 && (y2-y1)%y == 0) { if(((x2-x1)/x + (y2-y1)/y)%2 == 0) printf("YES\n"); else printf("NO\n"); } else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67624/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67624/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
/* made with <3 */ #include <stdio.h> #define N 300 int main(void){ int n; char s[N]; int x = 0, y = 0; int i, j, k, ans = 0; scanf("%d\n", &n); scanf("%s", s); for(i = 0; i < n; i++) for(j = i; j < n; j++) { x = y = 0; for(k = i; k <= j; k++) { if( s[k] == 'U' ) y++; if( s[k] == 'D' ) y--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67668/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 lotus[200] ; for( int pp = 0 ; pp < 200 ; pp++ ) lotus[pp] = 0 ; int n ; scanf("%d",&n) ; if(n==1) { printf("yes\n") ; return 0 ; } char ch = getchar() ; // int x = 'c' ; printf("%d\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67710/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67710/source.c" target datalayout = "e-m:e-p270:32:32-p271: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); int count = 0,l; for(l=1; l<n; l++) { int remaining = n-l; if(remaining%l==0) count++; } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67761/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67761/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,l,m,c=0; scanf("%d",&n); for(i=1;i<n;i++) {l=n-i; if(l%i==0) c++;} printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67804/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67804/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include"stdio.h" #include"string.h" #include"math.h" #include"stdlib.h" #include"ctype.h" #include"limits.h" #include"time.h" #include"stdbool.h" /* int quality(const void *a, const void *b) { return (*(int *)a - *(int *)b); } */ int main() { int t,d=1; long long n,i; scanf("%lld",&n); char a[n+5]; scanf("%s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67848/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; while(scanf("%d",&n)!=EOF) { int count=0; for(int i=1;i<=n-1;i++) if((n-i)%i==0) count++; printf("%d\n",count); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67934/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include "stdio.h" int main() { int a, b; scanf("%d%d", &a, &b); if(a==b) printf("%d0 %d1\n", a, b); else if(a==b-1) printf("%d9 %d0\n", a, b); else if(a==9&&b==1) printf("%d9 %d00\n", a, b); else puts("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_67978/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_67978/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { long long a,b,c,d,m,n,i,j; scanf("%lld",&m); for(i=0;i<m;i++) { scanf("%lld%lld%lld%lld",&a,&b,&c,&d); if((d/c)<a)a=d/c; n=d-(c*a); if(n<=b)printf("YES\n"); else printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_6802/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_6802/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include <stdlib.h> int main() { int i,n,flag=0,s=0,t=0; char a[10000]; scanf("%d",&n); scanf("%s",a); for(i=0; i<n; i++) { if(a[i]!='4'&&a[i]!='7') flag=1; } for(i=0; i<n/2; i++) s+=a[i]-'0'; for(i=n/2; i<n; i++) t+=a[i]-'0'; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68092/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #define ll long long int ll min(ll a,ll b){ if(a<=b) return a; else return b; } int main(){ ll n,m; scanf("%lld%lld",&n,&m); ll a,b,ea=0,oa=0,eb=0,ob=0; for(int i=0;i<n;i++){ scanf("%lld",&a);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68135/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 f(a, b, c) for(int a = b; a < c; a++) int n; int main(){ char s[144]; scanf("%s", &s); n = strlen(s); int c = 0; f(i, 0, n) if(s[i] == 'Q') f(j, i + 1, n) if(s[j] == 'A') f(k, j + 1, n) if(s[k] == 'Q') c++; printf("%d", c); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68221/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> long map[55][55]={0}; int main() { long n,m,a,b; long i,j,k,l; long min=500000; long temp; scanf("%ld%ld",&n,&m); for(i=1;i<=n;i++) for(j=1;j<=m;j++) scanf("%ld",&map[i][j]); scanf("%ld%ld",&a,&b); for(i=1;i+a-1<=n;i++) for(j=1;j+b-1<=m;j++) { temp=0; for(k=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @map = dso_local global [55 x...
#include<stdio.h> int main() { long long n,k,x,j; scanf("%llld %lld",&n,&k); j=n%k; j=k-j; x=n+j; printf("%lld",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68315/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,k,a; while(scanf("%d%d",&n,&k)!=EOF) { a=(n/k+1)*k; printf("%d\n",a); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68359/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 t,k,i,p; scanf("%d %d",&t,&k); i=t%k; p=t/k; p=p*k; { while(i!=k) { i++; } printf("%d",i+p); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68409/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main() { int n,a,b,c,d,i,j,x; char s[500][500]; while(~scanf("%d %d",&a,&b)) { getchar(); for(i=1; i<=a; i++) { scanf("%s",s[i]); } for(i=1; i<=a; i++) { printf("%s",s[i]); p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68452/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <unistd.h> #include <string.h> int main(void) { int h,w; scanf("%d%d", &h,&w); char str[h + 1][w + 1]; int i; i = 0; while (i < h) { scanf("%s", str[i]); i++; } i = 0; while (i < h) { printf("%s\n", str[i]); printf("%s\n", str[i]); i++; } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> int main(void) { int h,w; scanf("%d%d", &h,&w); for(int i=0; i<h; i++) { char c[w+1]; scanf("%s", c); for(int j=0; j<w; j++) printf("%c", c[j]); printf("\n"); for(int j=0; j<w; j++) printf("%c", c[j]); printf("\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68539/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { long long m,n,min,max; scanf("%lld %lld",&n,&m); /*if(sum%5==0&&sum/5!=0) { printf("%d\n",sum/5); } else printf("-1\n"); */ max=(n-m+1)*(n-m)/2; long long temp=((n/m)*(n/m -1)*m)/2; min=(temp + (n%m)*(n/m)); printf("%ll...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_6859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_6859/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 h,w,i; char c[101]; scanf("%d %d",&h,&w); for(i=0;i<h;i++){ scanf("%s",c); printf("%s\n%s\n",c,c); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68632/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
// AOJ DPL_1_E Edit Distance (Levenshtein Distance) // 2018.4.26 bal4u #include <stdio.h> #include <string.h> #define MAX_S 1003 char s1[MAX_S], s2[MAX_S]; int M[MAX_S][MAX_S]; int string_distance(int len1, char *str1, int len2, char *str2) { int i, j, d, min; if (len1 == 0) return len2; if (len2 == 0)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68683/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @M = dso_local local_unnamed_...
#include<stdio.h> #include<string.h> #define STACK_MAX 1000 #define STACK_NUM 100 char stack[STACK_NUM][STACK_MAX]; int stack_top[STACK_NUM]; void push(int n, char stack[], char word); char pop(int n, char stack[]); int main(void){ int n, i, p1, p2; char order[8], word, pop_count = 0, pop_words[STACK_MAX*STACK_NU...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68748/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68748/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stack_top = dso_local local_...
#include <stdio.h> #include <ctype.h> #include <string.h> int main(void) { char oder[5]; char color; int i=0;// for文用 int n=0;//山の数とか int mt_num=0,mt_num2=0; scanf("%d",&n); char yama[n][1000]; int mt_cnt[n]; for(i=0;i<n;i++){ mt_cnt[n]=0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68799/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68799/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int compar(const int *val1,const int *val2){ return *val1-*val2; } int main(void){ int map[12]={0},i; for(i=0;i<12;i++) scanf("%d",&map[i]); qsort(map,12,sizeof(int),(int(*)(const void *,const void *))compar); if(map[0] == map[3] && map[4] == map[7]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68841/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68841/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
/*******************karan*****************************/ #include<stdio.h> #include<string.h> #include<stdlib.h> #include<assert.h> #include<math.h> #include<ctype.h> #define S(a,x) scanf("%"#a,&x) //#a expands to "a" we use this bcoz, arguments are not replaced within quoted strings #define PS(a,x) printf("%"#a" ",x) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_689/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_689/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @a = dso_local local_unnamed_addr...
#include<stdio.h> int main(){ int a,b; while(1){ scanf("%d%d",&a,&b); if(a==0&&b==0) return 0; if(a>b) printf("%d %d\n",b,a); else printf("%d %d\n",a,b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68942/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68942/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; while(1){ scanf("%d %d",&a,&b); if(a==0&&b==0) break; if(a>b) printf("%d %d\n",b,a); else printf("%d %d\n",a,b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_68993/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_68993/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; while(1){ scanf("%d %d",&a,&b); if(a==0 && b==0){ break; }else if(a>=b){ printf("%d %d\n",b,a); }else{ printf("%d %d\n",a,b); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69035/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69035/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x, y; while(1){ scanf("%d %d",&x, &y); if( x==0 && y ==0)break; if(x>=y) printf("%d %d\n", y, x); else if(y>=x) printf("%d %d\n",x, y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <math.h> int main(){ int x,y; while (1){ scanf("%d %d",&x,&y); if (x == 0 && y==0)break; if (x < y){ printf("%d %d\n",x,y); } else{ printf("%d %d\n", y, x); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69121/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x, y; while(1) { scanf("%d %d", &x, &y); if(x ==0 && y == 0) break; if(x < y) { printf("%d %d\n",x, y); }else { printf("%d %d\n", y, x); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69165/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y; for(;;) { scanf("%d %d",&x,&y); if(x != 0 | y != 0) { if(x < y) { printf("%d %d\n",x,y); } else { printf("%d %d\n",y,x); } } else { break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69208/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,s; while(1){ scanf("%d\n%d",&x,&y); if(x==0 && y==0){ break; }else{ if(x>y){ s = x,x = y,y = s; }else{ } } printf("%d %d\n",x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69259/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69259/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { while (1) { int x, y; scanf("%d %d", &x, &y); if (x == 0 && y == 0) break; if (x > y) { int t=x; x=y; y=t; } printf("%d %d\n", x, y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69301/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69301/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y; for(;; x=1,y=1){ scanf("%d %d",&x,&y); if((x == 0) && (y ==0)) break; if(x<y){ printf("%d %d\n",x,y); }else if(x>y){ printf("%d %d\n",y,x); }else{ printf("%d %d\n",x,y); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69345/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69345/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i, x[10001], y[10001]; i = 0; while(1) { scanf("%d %d", &x[i], &y[i]); if ((x[i] == 0) && (y[i] == 0)) break; i++; } i = 0; while(1) { if ((x[i] == 0) && (y[i] == 0)) break; if (x[i] < y[i]) printf("%d %d\n", x[i], y[i]); else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69389/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y; while(1){ scanf("%d %d\n",&x,&y); if(x==0 && y==0) break; if(x<y) printf("%d %d\n",x,y); else printf("%d %d\n",y,x); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69431/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x[2999]; int y[2999]; int i = 0; int c = 1; int j; while(1){ scanf("%d %d\n",&x[i], &y[i]); if(x[i] == 0 && y[i] == 0) break; i++; } for(j = 0;j < i;j++){ if(x[j] < y[j]) printf("%d %d\n",x[j], y[j]); else printf("%d ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69475/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y; scanf("%d %d", &x, &y); while(x !=0 || y !=0){ if(x < y){ printf("%d %d\n", x, y); }else { printf("%d %d\n",y, x); } scanf("%d %d" ,&x, &y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69518/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69518/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,a; while (1){ scanf("%d %d",&x,&y); if (x==0 && y==0) break; if(x>y){ printf("%d %d\n",y,x); }else{ printf("%d %d\n",x,y); } if (x==0 && y==0) break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69561/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69561/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x, y; while (1) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) { break; } if (x > y) { printf("%d %d\n", y, x); } else { printf("%d %d\n", x, y); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69604/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69604/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y; while(1){ scanf("%d %d",&x,&y); if(x==0 && y==0){ break; }else if(x<y){ printf("%d %d\n",x,y); }else if(x>y){ printf("%d %d\n",y,x); }else{ printf("%d %d\n",x,y); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69648/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,a,b; while(1){ scanf("%d %d \n",&x,&y); if(x == 0 && y == 0) break; if (x>y){ a = y; b = x; } else{ a = x; b = y; } printf("%d %d\n",a,b); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69691/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69691/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,t; while(1) { scanf("%d %d" , &x,&y); if(x==0 && y==0)break; if(x > y) t =x ,x=y , y=t; printf("%d %d\n" , x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69734/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69734/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 num1, num2; while(1) { scanf("%d %d", &num1, &num2); if(num1 == 0 && num2 ==0) break; if(num1 <= num2) { printf("%d %d\n", num1, num2); } else { printf("%d %d\n", num2, num1); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69842/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
/* Swapping Two Numbers */ #include <stdio.h> int main(void) { int x, y; do { scanf("%d %d", &x, &y); if ( x + y == 0) { break; } else if (x <= y) { printf("%d %d\n", x, y); } else { printf("%d %d\n", y, x); } } while(1); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69893/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x = 0, y = 0; int i, j; for (i = 0; i <= 3000; i++) { scanf("%d", &x); scanf("%d", &y); if (y < x) { j = x; x = y; y = j; } if (x == 0 && y == 0) { break; } printf("%d %d\n", x, y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_69936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_69936/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 N 100000 int main() { static int color[N + 2]; int n, i, j; scanf("%d", &n); if (n <= 2) { printf("1\n"); for (i = 2; i <= n + 1; i++) printf("1 "); printf("\n"); } else { for (i = 2; i <= n + 1; i++) { if (color[i]) continue; for (j = i + i; j <= n + 1; j += i) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_6998/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_6998/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @main.color = internal unnamed_...
#include <stdio.h> int main(int argc, const char * argv[]) { // insert code here... int x,y,tmp; while(1){ scanf("%d %d",&x, &y); if(x==0 && y==0){ break; } if(x>y){ tmp = x; x = y; y = tmp; } printf("%d %d\n",x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70028/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y; for(;;){ scanf("%d%d", &x,&y); if (x==0&&y==0) break; if ( x > y){ printf("%d %d\n", y, x); }else{ printf("%d %d\n", x, y); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70071/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x[10000], y[10000]; int i, t; int e1, e2; e1 = 0; e2 = 0; for( i = 0; e1 == 0; i++ ){ scanf("%d %d", &x[i], &y[i]); if( x[i] == 0 ){ if( y[i] == 0 ) e1 = 1; } } for( t = 0; e2 == 0; t++ ){ if( y[t] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70121/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main() { int arr[100005]; int n,i,check=0,f,j; scanf("%d",&n); for(i=2;i<=n+1;i++) { //printf("i=%d",i); f=0; for(j=2;j*j<=i;j++) { if(i%j==0) { f=1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_7018/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_7018/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> int main(){ int x, y; while(1){ scanf("%d %d", &x, &y); if(x==0 && y==0)break; if(x<y){ printf("%d %d\n", x, y); }else{ printf("%d %d\n", y, x); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70222/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70222/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,t; while(1){ scanf("%d %d",&x,&y); if (x==0 && y==0) break; if (x>y) t=x,x=y,y=t; printf("%d %d\n",x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70273/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70273/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x, y; while(1){ scanf("%d %d", &x, &y); if(x == 0 && y == 0){ break; } if(x < y){ printf("%d %d\n",x ,y); }else{ printf("%d %d\n",y ,x); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70316/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70316/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main() { int n,i,j,k,pos; char names [2][20],out[2][20]; scanf("%s",names[0]); strcpy(out[0],names[0]); scanf("%s",names[1]); strcpy(out[1],names[1]); scanf("%d",&n); for(i=0;i<n;i++) { for(j=0;j<2;j++) printf("%s ",out[j]); for(j=0;j<2;j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_7036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_7036/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x; int y; int tmp; while(1) { scanf("%d %d",&x,&y); if (x == 0 && y == 0) break; if (x > y) { tmp = x; x = y; y = tmp; } printf("%d %d\n",x,y); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70402/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70402/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main() { int x, y; int t; for (;;) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) break; if (x > y) t = x, x = y, y = t; printf("%d %d\n", x, y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70446/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70446/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 swap(x, y) {int z; z=y; y=x; x=z;} int main() { int a, b; while(scanf("%d %d", &a, &b)) { if(a==0 && b==0) { break; } if(a>b) { swap(a, b); } printf("%d %d\n", a, b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70497/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70497/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,temp; while (1){ scanf("%d %d",&x,&y); if (x == 0 && y == 0) break; else if (x >= y){ temp = x; x = y; y = temp; } printf("%d %d\n",x,y); } ret...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70547/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70547/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i, a, b; for(i = 1;; i++){ scanf("%d %d", &a, &b); if(a == 0 && b == 0) break; if(a > b) printf("%d %d\n", b, a); else printf("%d %d\n", a, b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70598/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70598/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,t; while(1){ scanf("%d %d", &x, &y); if ( x == 0 && y == 0) { break; }else if (x > y){ t = x; x = y; y = t; } printf("%d %d\n",x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70640/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70640/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i, x, y; while(1) { scanf ("%d %d", &x, &y); if( x == 0 && y == 0 ) break; else if ( x < y ) { printf ( "%d %d\n", x, y ); }else { printf ( "%d %d\n", y, x ); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70684/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70684/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 main() { int a, b; for(int i=1;;i++) { scanf("%d %d", &a, &b); if (a==0 && b==0) break; else if (a < b) printf("%d %d\n", a, b); else printf("%d %d\n", b, a); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70734/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70734/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 p[200005], cnt[200005]; int root(int n) { if (p[n] != n) p[n] = root(p[n]); return p[n]; } void uni(int a, int b) { a = root(a); b = root(b); if (a != b) { p[a] = b; cnt[b] += cnt[a]; } return; } int main() { int n, m; scanf("%d %d", &n, &m); int i; int a[200005], b[200005]; for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70785/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70785/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @p = dso_local local_unnamed_...
#include <stdio.h> int main() { int n; int i; int data[100]; int in; int temp; int s, g; while(1) { scanf("%d", &n); if(n == 0) break; for(i = 0; i < n; i++) scanf("%d", &data[i]); scanf("%d", &in); s = 0; g = n-1; for(i = 1; ; i++) { temp = (s + g) / 2; if(data[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_70828/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_70828/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...