Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<stdlib.h> #include<string.h> void push(int); int top =0; int K[100]; int main(){ int i = 0,j,x; char s[100],num; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ K[top-1] = K[top-1] + K[top]; K[top]= 0; top--; } else if ( s[0] == '-' ){ K[top-1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285862/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #include<string.h> int t=0,num[100]; void push(int); int pop(void); int main(){ int a,b; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ a=pop(); b=pop(); push(a+b); } else if ( s[0] == '-' ){ a=pop(); b=pop(); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @t = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> #include <ctype.h> int stack[128]; int size; void push(int x) { stack[size] = x; size++; } int top(void) { return (stack[size - 1]); } void pop(void) { size--; } int main(void) { char s[128]; int a, b; int tmp; while (scanf("%s", s) != EOF){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285963/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285963/source.c" target datalayout = "e-m:e-p270: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 = dso_local local_un...
#include <stdio.h> #include <stdlib.h> #include <string.h> int head=0; int A[200]; void push(int x){ head=head+1; A[head]=x; } int pop(){ head=head-1; return A[head+1]; } int main(int argc, const char * argv[]) { int a,b; char c[100]; while(scanf("%s",c)!=EOF){ if(c[0]=='+'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286005/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @head = dso_local local_unn...
#include <stdio.h> #include <string.h> #include <stdlib.h> int s[224] = {}; void push(int ); void empty(); int pop(); int top = 0; int main(){ char ss[224]; int x,y; while(scanf("%s",ss) != EOF){ // printf("%s\n",ss); if(ss[0] == '+'){ x = pop(); y = pop(); // printf("+x = %d,y = %d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286056/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @s = dso_local local_unname...
#include<stdio.h> #include<stdlib.h> #define MAX 199 void initalize(void); int isEmpty(void); int isFull(void); void push(int); int pop(void); int S[MAX]; int top; int main(){ int y1,y2; char x[100]; while( scanf("%s", x) != EOF ){ if ( x[0] == '+' ){ y1=pop(); y2=pop(); push(y1+y2); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286142/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> const char *names[50] = {"Lol", "Kek", "Samuel", "Lom", "Lon", "Loo", "Lop", "Loq", "Lor", "Los", "Lot", "Lou", "Lov", "Low", "Lox", "Loy", "Loz", "Lpa", "Lpb", "Lpc", "Lpd", "Lpe", "Lpf", "Lpg", "Lph", "Lpi", "Lpj", "Lpk", "Lpl", "Lpm", "Lpn", "Lpo", "Lpp", "Lpq", "Lpr", "Lps", "Lpt", "Lpu", "Lpv",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28620/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define N 100 int main(void){ int i=0,num[N],x; char str[N]; while(scanf("%s",str)!=EOF){ if(str[0]=='+'){ num[i-2]+=num[i-1]; i--; }else if(str[0]=='-'){ num[i-2]-=num[i-1]; i--; }else if(str[0]=='*'){ num[i-2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286243/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286243/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define MAX 1000 int top=0; int S[MAX]; void push(int x); int pop(); int main(){ int a,b; char str[MAX]; while(scanf("%s",str)!=EOF){ if(str[0]=='+'){ a=pop(); b=pop(); push(b+a); }else if(str[0]=='-'){ a=pop(); b=pop(); push(b-a); }else if(str[0]=='*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286315/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x; char s[200]; signed long long stack[200]; int esp=0; while( scanf("%s",s) != EOF){ if(s[0] == '+'){ esp--; stack[esp-1] += stack[esp]; } else if(s[0] == '-'){ esp--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286366/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define MAX_NUM_STACK_VALUES 100 #define STR_MAX_LENGTH 100 /* * Stack */ typedef struct { int top; // index of top int values[MAX_NUM_STACK_VALUES]; } Stack; void printStack(Stack S) { for (int i = 1; i <= S.top; i++) printf("%d ", S.values[i]); pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286416/source.c" target datalayout = "e-m:e-p270: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.Stack = type { i32,...
#include<stdio.h> #include<stdlib.h> #include<string.h> int top,S[1000],i=0; void push(int x){ S[++top]=x; } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top=0; char s[100]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ a=pop(); b=pop(); push(a+b); } else if(s[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286474/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286474/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @i = dso_local local_unname...
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x){ S[++top] = x; } int pop(){ top--; return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while( scanf("%s", s )!= EOF ){ if ( s[0] == '+' ){ a = pop(); b = pop(); push(a + b); }else if ( s[0] == ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286524/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286524/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> #include <math.h> int getop(char []); void push(double); double pop(void); int main() { char s[100]; int t; double op; while((t = getop(s)) != EOF && t < 100) { switch (t) { case '0': push(atof(s)); break; case '+': push(pop() + pop()); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286568/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286568/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 saki,S[1000]; void in(int x){ S[++saki]=x; } int hen(){ saki--; return S[saki+1]; } int main(){ int a,b; saki=0; char s[100]; while(scanf("%s",s) != EOF){ if(s[0] == '+'){ a=hen(); b=hen(); in(a + b); } else i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286625/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> #include <string.h> void push(int); int pop(void); int stack[100]; int stack_pointer = 0; int main(){ int x, a, b; char s[100]; while(scanf("%s", s) != EOF){ if(s[0] == '+' ){ a = pop(); b = pop(); push(a+b); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286683/source.c" target datalayout = "e-m:e-p270: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_pointer = dso_local ...
/* stack構造を用いて逆ポーランド記法を行うプログラム */ #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 101 /* プロトタイプ宣言 */ void Push(int[], int); int Pop(int[]); /* グローバル変数宣言 */ int cnt = 0; int main(){ /* 変数宣言 */ int x, y; int val1=0, val2=0, val3=0; int i=0; /* 数字か演算子か調べる配列を宣言 */ char s[N]; /* 重要!! ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286726/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local local_unna...
#include <stdio.h> #include <ctype.h> #include <string.h> #include <math.h> int main () { int n, arr[1020], i, j, k, l, lm, rm, temp; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d", &arr[i]); } for(i = 1; i < n; i++) { for(j = 0; j < (n - i); j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28677/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28677/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> #include <stdlib.h> int top = 0; int stack[1000] = {0}; void push(int x) { stack[++top] = x; } int pop() { top--; return stack[top + 1]; } int main(void) { int a = 0; int b = 0; char str[100] = {0}; while (scanf("%s", str) != EOF) { if (str[0] == '+') { a = pop...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #define MAX 100 #define SIZE 100 int stack[SIZE]; int stack_size = 0; int pop(){ stack_size--; return stack[stack_size+1]; } void push(int x){ stack_size++; stack[stack_size] = x; } int main(){ int stock,x,a,b,i; char s[MAX]; while( scanf("%s", s) != EOF )...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286856/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286856/source.c" target datalayout = "e-m:e-p270: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_size = dso_local loc...
#include <stdio.h> int main(void) { int count; scanf("%d", &count); for (int tmp = 0; tmp < count; ++tmp) { int c = 0; int k; scanf("%d", &k); for (int u = 0; u < k; ++u) { int x; scanf("%d", &x); if (k == 1 && x % 2 == 1 && c == 0) { ++c; printf("-1\n"); } if (x % 2 == 0 && c =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2869/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2869/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include<string.h> int top,S[1000]; void push(int x){ S[++top] = x; } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top = 0; char s[100]; while(scanf("%s",s) != EOF){ if(s[0] == '+'){ a = pop(); b = pop(); push(a + b); } e...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286942/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286942/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include<stdio.h> #include<string.h> #include<stdlib.h> void push(int); int pop(void); int top,STACK[1000000]; int main() { char s[100]; int x,y,z; top=0; while(scanf("%s", s)!=EOF) { if(s[0]=='+') { y=pop(); z=pop(); push(y+z); } else if(s[0]=='-') { y=pop(); z=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286986/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<string.h> #include<stdlib.h> void push(int); int pop(void); int top,sta[1000]; int main() { int a,b,i; top=0; char c[100]; i=0; while(scanf("%s",c) != EOF) { if(c[0]=='+') { a=pop(); b=pop(); push(a+b); } else if(c[0]=='-') { a=pop(); b=pop(); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287028/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #define SIZE 100 void push(int); int pop(void); int stack[SIZE]; int top = 0; int main(){ char data; int num,status,i,j,k,count = 0; while(1){ status = scanf("%c",&data); if(status != 1) break; if(data == ' '){ count = 0; continue; } if(d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287071/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> int top=0; int z[100]; char s[100]; void push(int x) { top++; z[top] = x; } int pop() { top--; return z[top+1]; } int main(void) { int a=0, b=0, c=0, d=0; while(scanf("%s",s) != EOF) { if(s[0] == '+') { push(pop() + pop()); } else if(s[0] == '-') { a = p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287114/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #include <string.h> int top, S[1000]; void push(int x) { S[++top] = x; } int pop() { top--; return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while ( scanf("%s", s) != EOF ) { if ( s[0] == '+' ) { a = pop(); b = pop(); push...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287158/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287158/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> #include <string.h> int top = 0, S[1000]; void push(int x) { S[++top] = x; } int pop(void) { top--; return S[top+1]; } int main(void) { int a, b; top = 0; char s[100]; while(scanf("%s",s) != EOF) { if(s[0] == '+') { a = pop(); b = pop(); pus...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287200/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287200/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int x,a=0; char s[200]; signed long long stack[200]; while(scanf("%s",s)!=EOF){ if(s[0]=='+'){ a--; stack[a-1]+=stack[a]; }else if(s[0]=='-'){ a--; stack[a-1]-=stack[a]; }else if(s[0]=='*'){ a--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287244/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287244/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAXi 1000 #define MAXc 100 void push(int a); int pop(void); int top; int stack[MAXc]; int main(void) { int a,b; char *stack; stack=calloc(MAXi,sizeof(char)); while(scanf("%s",stack)!=EOF) { if(stack[0]=='+') { a=pop(); b=pop...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287288/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 size 1000 void push(int); int pop(void); int stack[size]; int top = 0; int main(){ int x; char s[100]; int a,b; while(scanf("%s",s) != EOF){ /* if(s[0] =='F') break; */ if(s[0] == '+'){ a = pop(); b = pop(); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287330/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #define N 100 int isEmpty(void); void push(int); int pop(void); int stack[N]; int top = 0; int main(){ int x,a,b; char str[100]; while( scanf("%s", str) != EOF ){ if ( str[0] == '+' ){ a = pop(); b = pop(); push(a + b); } else if ( str[0] == '-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287374/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287374/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #include <string.h> void push(int ); void calc(char ); int top=1; int s[100]; int main(){ char num[4]; int i,tmp,flag=0; while(1){ if(scanf("%s",num) == EOF)break; flag =0; for(i=0;i<strlen(num);i++){//数字判定 if(num[i]< '0'|| '9'< num[i])flag=1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287417/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287417/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> int main(void){ int num[100],j = 0; char string[401]; fgets(string,sizeof(string),stdin); for(int i = 0; i < 100; i++)num[i] = 0; for(int i = 0; string[i] != '\n'; i++){ if(string[i] >= '0' && string[i] <= '9'){ if(string[i - 1] == ' ')j++; num[j] *= 10; num[j] += s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287475/source.c" target datalayout = "e-m:e-p270: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() { long int t, x, y; scanf("%ld",&t); while(t--) { scanf("%ld%ld",&x,&y); if(x==y) {printf("YES\n");continue;} if(x==1) {printf("NO\n");continue;} if(x==2||x==3) { if(y==2||y==3||y==1)printf("YES\n"); else prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28754/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28754/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 INF 1e9 int N, M, R; int r[8]; int flag[8]; int graph[200][200]; int res = INF; void chmin(int *a, int b){ if(*a > b) *a = b; } void dfs(int depth, int las, int dist){ if(depth == R){ chmin(&res, dist); return; } for (int next = 0; next < R; next++) { if(flag[next]) con...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287583/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287583/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @res = dso_local local_unna...
#include <stdio.h> int leap(int); int main(void){ int a,b,i; int flag; int ff=0; while(scanf("%d %d",&a,&b),(a||b)){ if(ff!=0) printf("\n"); ff=1; flag=1; for(i=a;i<=b;i++){ if(leap(i)){ printf("%d\n",i); flag=0; } } if(flag) printf("NA\n"); } } int leap(int k){ if(k%100!=0){ if(k%4...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287626/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287626/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count = 0; int n[3000]; int flg = 0; int i,j,x; for(;;){ scanf("%d %d",&a,&b); if(a == 0 && b == 0){ break; }else if(flg == 1) printf("\n"); for(i = 0; i < 3000; i++) n[i] = i; for(i = a; i <= b; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287727/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287727/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { /* 西暦年が 4 で割り切れる年であること。 ただし、100 で割り切れる年はうるう年としない。 しかし、400 で割り切れる年はうるう年である。 */ int s, e; int i, f, b; b = 0; while(scanf("%d %d\n", &s, &e) == 2) { if(s == 0 && e == 0) break; if(b) printf("\n"); f = 0; for(i=s;i<=e;i++) { if(i%400==0) { print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287778/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287778/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w, a, b, c, i, z; while (1) { scanf("%d", &w); if (w == -1)break; a = 1150; for (i = 11;i <= w;i++) { if (i <= 20) { a += 125; } else if (i >= 31) { a += 160; } else { a += 140; } } b = (4280 - a) ; printf("%d\n", b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287828/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287828/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,a,b,c,d,e,f,g,h; scanf("%d",&w); while (w!=-1) { a=1150; b=1150+125*(w-10); c=1150+1250+140*(w-20); d=1150+1250+1400+160*(w-30); e=4280-a; f=4280-b; g=4280-c; h=4280-d; if (w<=10) { printf("%d\n",e); } if (10<w && w<=20) { printf("%d\n",f);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287871/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287871/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int i; int n,m; long long s=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&m); s+=m; } printf("%d\n",(int)(s/n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287929/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287929/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 buy, n, i, sum = 0; scanf("%lld", &n); for(i = 0; i < n; ++i){ scanf("%lld", &buy); sum += buy; } printf("%lld\n", sum /n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287972/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287972/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sort(int n, int S[n]) { int i, j; int tmp; for(i = 0; i < n - 1; i ++){ for(j = n - 1; j > i; j--){ if(S[j - 1] > S[j]){ tmp = S[j - 1]; S[j - 1] = S[j]; S[j] = tmp; } } } } int main() { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, s, i, sum10=0, min=100,mf=0, sumn=0,j=0,jt=0; scanf("%d",&n); for(i=0;i<n; i++){ scanf("%d",&s); if(s%10==0){ sum10+=s; }else{ sumn+=s; if(min > s){ mf=1; min = s; } } }//scan end if(sumn==0)sum10=0; if(min==100)min=0; if(sumn%10==0){ sumn-=min; } printf("%d\n",sum10+su...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 min(int a, int b) { if (a > b){ return (b); } return (a); } int switch_color(int *ball, int check, int col, int n, int *top, int *bottom) { int i, j; *top = check; i = check - 1; while (i >= 0 && ball[i] == col){ *top = i; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288108/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ,m,p,i,AC = 0,WA = 0,ac[100008] ={0},wa[100008] = {0}; char s[3]; scanf("%d%d",&n,&m); for(i = 0 ; i < m ; i++) { scanf("%d %s",&p,s); if(ac[p] == 1) { continue; } else if(s[0] == 'A') { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #define SWAP(type,a,b) { type work = a; a = b; b = work; } /* 基準値を選ぶ */ int select_pivot(int* array, int begin, int end) { return array[(begin + end) / 2]; // 中央の要素を基準値とする } /* クイックソート (再帰部分、昇順) */ void quick_sort_rec(int* array,char results[][5], int begin, int e...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288195/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288195/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <time.h> #define GYOU_MAX 256 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define PRINT(str) printf(#str "\n") #define FOR(i, m, n) for(int i = m; i < n; i++) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) >...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288245/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288245/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <math.h> #include <limits.h> #define REP(i,n) for(i=0;i<n;i++) #define MOD 1000000007 //prototype declaration int i_in(); long long ll_in(); double d_in(); char c_in(); void s_in(char *s); void i_out(int i); void ll_out(long long i); void d_out(doub...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288289/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288289/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main( void ) { int a,b; scanf( "%d %d", &a, &b ); if( a < b ) { printf( "a < b\n" ); } else { if( a > b ) { printf( "a > b\n" ); } else { printf( "a == b\n" ); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288331/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288331/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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", &a, &b); if (a < b) { printf("a < b\n"); } if (a > b) { printf("a > b\n"); } if (a == b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288375/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288375/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main (void){ int a,b; scanf("%d%d",&a,&b); if(a<b){ printf("a < b\n"); } if(a>b){ printf("a > b\n"); } if(a==b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288418/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288418/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a,b; scanf("%d %d", &a, &b); if(a>b) { printf("a > b\n"); } if(a<b) { printf("a < b\n"); } if(a==b) { printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b; scanf("%d %d",&a,&b); if(a<b) { printf("a < b\n"); } else if(a>b) { printf("a > b\n"); } else { printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288511/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if (a > b) { puts("a > b"); } else if (a < b) { puts("a < b"); } else { puts("a == b"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288555/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288555/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b; scanf("%d %d",&a,&b); if(a > b){ printf("a > b\n"); }else if(a < b){ printf("a < b\n"); }else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288605/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b; scanf("%d",&a); scanf("%d",&b); if(a<b){ printf("a < b\n"); } else if(a>b){ printf("a > b\n"); } else{ printf("a == b\n"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if(a < b) printf("a < b\n"); else if(a > b) printf("a > b\n"); else if(a==b) printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288692/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main (void){ int a,b; scanf("%d %d",&a,&b); if(a<b){ printf("a < b\n"); } else if(a>b){ printf("a > b\n"); } else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288742/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288742/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a=0,b=0; scanf("%d %d",&a,&b); if(a>b){ printf("a > b\n"); }else if(a==b){ printf("a == b\n"); }else{ printf("a < b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288793/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288793/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b; scanf("%d %d",&a,&b); if(a>b) printf("a > b\n"); else if(a<b) printf("a < b\n"); else printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288836/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288836/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char a[105]; while (scanf("%d",&n)!=EOF){ getchar(); for (int i = 1;i <= n;i++){ scanf("%c",&a[i]); } int sum = 0; for (int i = n;i > 1;i--){ if (a[i] == '1' && a[i-1] == '0'){ char c = a[i]; a[i] = a[i-1]; a[i-1] = c; } else if (a[i] == '1'...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28888/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<stdbool.h> #include<string.h> #include<math.h> #include<ctype.h> #define MOD 10000007 #define rep(i,n) for(ll i=0;i<n;i++) #define revrep(i,n) for(ll i=n;i>0;i--) typedef long long ll; ll mygcd(ll a, ll b) { if (b == 0) return a; return mygcd(b, a % b); } ll mylcm(ll a, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288922/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288922/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @fac = dso_local local_unna...
#include <stdio.h> int tai(int x,int y){ x = x*x+y*y; return x; } int main(){ int h,w,h1,w1; while(1){ int ha=151,wa=151; scanf("%d %d",&h1,&w1); if((h1==0)&&(w1==0)){ return 0; } for(h=1;h<150;h++){ for(w=h+1;w<=150;w++){ if(((tai(w,h) > tai(w1,h1)) && (tai(h,w) < tai(ha,wa))) || ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288980/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288980/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> double memo[150][150]; int main(void){ int i,j,h,w; int min,now,nh,nw,nnh,nnw; while(1){ scanf("%d%d",&h,&w); if(h+w==0)break; //if(h<w-1)printf("%d %d\n",h+1,w); //else{ now = h*h+w*w; min = now*1500; nh = 150; nw =150; nnh = 150; n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289022/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289022/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <limits.h> #define INF (INT_MAX/2) typedef struct { short v; // 接続先の番号 int c; // 有向辺の重み } edge; typedef struct { int k; // 頂点の持つ有向辺の数 edge* e; // 有向辺の配列 } vertex; int* ssspForCost( vertex* g, int n ) { int i; int *dist, color[n]; int minCost, u; d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289080/source.c" target datalayout = "e-m:e-p270: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.vertex = type { i32...
#include<stdio.h> #define N 10000 #define MAX 100000000 int main(){ int i,j,n,k,c=0,u,data[500000][3],A[N],flag[N]; scanf("%d",&n); for(i=0;i<n;i++){ A[i]=MAX; scanf("%d%d",&u,&k); for(j=0;j<k;j++){ data[c][0]=u; scanf("%d%d",&data[c][1],&data[c][2]); c++; } } A[0]=0; flag[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289130/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289130/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W -10 #define B -9 #define MAX 10001 #define INF 1000000000 void ISS(void); void DA(void); typedef struct{ int k; int *ten; int *omomi; }rist; int n;/*頂点数*/ rist T[MAX]; int color[MAX];/*色分け用配列*/ int d[MAX]; int pi[MAX]; int main() { int i,j,youso,kazu,v,kyori;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289174/source.c" target datalayout = "e-m:e-p270: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.rist = type { i32, ...
#include <stdio.h> #include<stdlib.h> #define N 100000 #define INF 1000000 typedef struct{ int go; int back; int cost; }Date; int n, d[N]; Date a[500000]; void root(int); int main(){ int i, j, l, k, count = 0; scanf("%d", &n); for( i = 0 ; i < n ; i++) { scanf("%d%d", &l, &k); for( j = 0 ; j <...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289217/source.c" target datalayout = "e-m:e-p270: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.Date = type { i32, ...
#include<stdio.h> int main(void) { int n,p[11],i,j,ba,cnt,temp; char y[101]; while(1){ scanf("%d",&n); if(n==0)break; for(i=1;i<=n;i++){ p[i]=0; } scanf("%s",y); ba=0; cnt=0; for(i=0;i<100;i++){ cnt++; if(cnt>n){ cnt=1; } if(y[i]=='M'){ p[cnt]++; } if(y[i]=='S'){ ba...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289260/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 (scanf("%d %d", &h, &w), h != 0 || w != 0){ for (i = 0; i < h; i++){ for (j = 0; j < w; j++){ printf("#"); } printf("\n"); } printf("\n"); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289318/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289318/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,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++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289361/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289361/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h, w, i, j; scanf("%d %d", &h, &w); while (!(h == 0 && w == 0)) { for (i = 1; i <= h; i++) { for (j = 1; j <= w; j++) { printf("#"); } printf("\n"); } printf("\n"); scanf("%d %d", &h, &w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289419/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289419/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); for(i=0;i<h;i++){ for(j=0;j<w;j++){ printf("#"); } printf("\n"); } if(h==0&&w==0) break; printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289462/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289462/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,h,i,j; while(1){ scanf("%d %d",&w,&h); if(w==0&&h==0) break; for(i=0;i<w;i++){ for(j=0;j<h;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289505/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[] ) { 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++ ){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289549/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j; for(;;){ scanf("%d %d",&h,&w); if(h == 0 && w == 0){ break; } for(i = 1;i <= h;i++){ for(j = 1;j <= w;j++){ printf("#"); } printf("\n"); } printf("\n");...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289606/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289606/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h,w,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++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289657/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289657/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i; scanf("%c",&i); if(i>='a' && i<='z') { printf("a\n"); } else{ printf("A\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289707/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289707/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 alpha; scanf("%c",&alpha); if(alpha>='A'&&'Z'>=alpha){ printf("A\n"); } else if(alpha>='a'&&'z'>=alpha){ printf("a\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289750/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289750/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; scanf("%c",&x); if(x>96){ printf("a\n"); }else{ printf("A\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289794/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289794/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ch; ch = getchar(); if(ch<0x60) { printf("A\n"); } else if(ch>0x60) { printf("a\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289837/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289837/source.c" target datalayout = "e-m:e-p270: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(void){ char a[2]; scanf("%c",a); if(a[0] >= 65 && a[0] <= 90){ printf("A\n"); }else if(a[0] >= 97 && a[0] <= 122){ printf("a\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; scanf("%c",&c); if(c>='A' && c<='Z') printf("A"); else printf("a"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289981/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289981/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> signed main(){ char a; scanf("%c",&a); if(a>='a'){ printf("a"); }else{ printf("A"); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290022/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290022/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ch; scanf("%c", &ch); if(ch >= 'A' && ch <= 'Z') { printf("A"); } else if(ch >= 'a' && ch <= 'z') { printf("a"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290066/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290066/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 aa; scanf("%c",&aa); if(aa<97) { printf("A"); }else{ printf("a"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290109/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290109/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t , i ; scanf("%d",&t); //printf("t=%d\n",t); for(i=0 ; i<t ; i++){ int n , j ; scanf("%d\n",&n); //printf("n=%d\n",n); char str[100000] ; int stra[100000] ; int strb[100000] ; int sum[100000] ; for(j=0; j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29016/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <stdlib.h> #define N 100000 #define MAX 1000000000000000000 int main (void) { char s[4]; scanf("%s", s); if ('a' <= s[0] && 'z' >= s[0]) { puts("a"); } else { puts("A"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290202/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290202/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * FileName: D_model * CreatedDate: 2020-06-28 10:07:57 +0900 * LastModified: 2020-06-28 10:11:29 +0900 */ #include<stdio.h> int main(){ long long n; scanf("%lld\n",&n); int ans=0; for(long long i=2;i*i<=n;i++)if(n%i==0){ int cnt=0; while(n%i==0){ n/=i,cnt++; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290246/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290246/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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--) { int k; scanf("%d", &k); char m[k]; scanf("%s", m); int a[k], b[k]; for (int i = 0; i < k;i++) { a[i] = m[i] - '0'; } b[0] = 1; for (int i = 1; i ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29029/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29029/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,n,i; scanf("%d",&t); while(t--) { scanf("%d",&n); char b[100000],a[100000]; scanf("%s",b); a[0]='1'; printf("%c",a[0]); for(i=1;i<n;i++) { if(b[i]-'0'+1!=a[i-1]-'0'+(b[i-1]-'0')) { a[i]='1'; printf("%c",a[i]); } else { a[i]='0'; print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29034/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; long long int a=0; scanf("%d%d",&n,&k); a=k; for(int i=1;i<n;i++) a*=(k-1); printf("%lld",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290390/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k,i; scanf("%d %d",&n,&k); int sum=k; if(n>=1&&k>=2&&n<=1000&&k<=1000) { for(i=n;i>1;i--) { sum=sum*(k-1); } printf("%d",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290433/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k; scanf("%d%d",&n,&k); long long ans=1; for(int i=0;i<n;i++){ if(i==0){ ans*=k; }else{ ans*=(k-1); } } printf("%lld",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290477/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290477/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 powi(int b, int e) { int a = 1; while (e != 0) { a *= b; --e; } return a; } int main(void) { int n, k; scanf("%d %d", &n, &k); printf("%d\n", k * powi(k - 1, n - 1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290527/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290527/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,K,i,answer=1; scanf("%d %d",&N,&K); for(i=0; i < N-1; i++){ answer *= K-1; } answer *= K; printf("%d",answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290578/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290578/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n; scanf("%d",&n); if(n<1200) printf("ABC\n"); else printf("ARC\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290620/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &a); if(a>=1200) printf("ARC\n"); else { printf("ABC\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290664/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...