Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include<stdio.h>
#include<stdlib.h>
int ROW_INDEX = 1;
//[min_range, max_range]からn_ints個の整数の組をすべてとりだしcomb[組][整数]に格納する
void AllCombs_ints(int min_range, int max_range, int depth, int n_ints, int **comb){
if(depth > 0){
for(int x = min_range; x <= max_range; x++){
//comb[0]を一時的な格納場所として使っている。気持ち悪い。
comb[0][depth... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176422/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176422/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@ROW_INDEX = dso_local loca... |
#include<stdio.h>
#include<string.h>
int main(){
char s[3];
scanf("%s",s);
char s1[]="abc";
char s2[]="acb";
char s3[]="bac";
char s4[]="bca";
char s5[]="cab";
char s6[]="cba";
if(strcmp(s,s1)==0){
printf("Yes");
}
else if(strcmp(s,s2)==0){
printf("Yes");
}
else if(strcmp(s,s3)==0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176466/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176466/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
char s[3];
scanf("%s", s);
if(s[0]+s[1]+s[2]=='a'+'b'+'c'){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176509/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176509/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int i,p=0;
char s[3];
for(i=0;i<3;i++)scanf("%s",s);
if(s[0]=='a'){
if((s[1]=='b'&&s[2]=='c')||(s[1]=='c'&&s[2]=='b'))
p+=1;
}
if(s[0]=='b'){
if((s[1]=='a'&&s[2]=='c')||(s[1]=='c'&&s[2]=='a'))
p+=1;
}
if(s[0]=='c'){
if((s[1]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176552/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176552/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
char s[4];
int c = 1;
scanf("%s", s);
for(int i = 0; i < 3; i++){
c *= s[i] - 'a' + 1;
}
printf("%s\n", (c == 6) ? "Yes" : "No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176596/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176596/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
char s[10];
scanf("%s",s);
if(s[0]!=s[1]){
if(s[1]!=s[2]){
if(s[2]!=s[0]){
printf("Yes");
}else{
printf("No");
}
}else{
printf("No");
}
}else{
printf("No");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176646/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176646/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 gcd(int a,int b)
{
if(b==0)
return a;
else
return gcd(b,a%b);
}
int main()
{
int a,b,c,k,p;
scanf("%d%d%d",&a,&b,&c);
k=gcd(a,b);
p=(a*b)/k;
printf("%d\n",c/p);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17669/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17669/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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()
{
char string[3];
scanf("%s",string);
int a=0; int b=0; int c=0;
for(int i=0;i<3;++i){
if(string[i]=='a') a=1;
else if(string[i]=='b') b=1;
else if(string[i]=='c') c=1;
}
if(a==1 && b==1 && c==1) printf("Yes\n");
else printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176732/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176732/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
int get_int(void) {
int num;
scanf("%d", &num);
return num;
}
// <arr[0]> <arr[1]> .. <arr[size-1]>
int fget_array(int *arr, int size) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176790/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176790/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j,kotae=1,amari,min=1000000001;
scanf("%d",&n);
int a[n];
for(i=0;i<n;i++){
scanf("%d",&a[i]);
if(a[i]<min){min=a[i];}
}
if(min==1){
printf("1");
return 0;
}
amari=0;
for(i=0;i<n;i++){
amari+=a[i]%min;
}
if(amari==0){
printf("%d",min);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176840/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176840/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 gcd(int a,int b){
if(a%b==0){
return b;
}else{
int c = a%b;
gcd(b,c);
}
}
int main(void){
int n,m,i,ans;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&m);
ans=gcd(ans,m);
}
printf("%d\n",ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176884/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176884/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
unsigned long gcd(unsigned long a, unsigned long b){
if(a % b == 0)return b;
return gcd(b, a % b);
}
int main(void){
int n;
unsigned long a, b;
scanf("%d", &n);
scanf("%ld", &a);
for(int i = 0; i < n - 1; i++){
scanf("%ld", &b);
a = gcd(a, b);
}
printf("%ld\n", a);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176927/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176927/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
typedef struct data{
struct data *next;
long xdeff;
long ydeff;
int num;
} cell;
long x[52],y[52],v[52][52],w[52][52];
cell *make(long v,long w);
int main(void){
int N,i,j,max;
long maxp,maxq;
char str[100],*p;
cell *q,s;
fgets(str,size... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_176970/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_176970/source.c"
target datalayout = "e-m:e-p270: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.data = type { ptr, ... |
#include <stdio.h>
int len;
char String[100020];
int Check(void);
int main(void) {
scanf("%s", String);
for (len = 0; String[len]; len++);
if (len == 2) {
if (String[0] == String[1]) printf("%d %d\n", 1, 2);
else printf("-1 -1\n");
}
else if (Check()) printf("%d %d\n", -1, -1);
return 0;
}
int Check... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177012/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177012/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 S[1000000];
int T[1000000];
int L[1000000];
int R[1000000];
int i, j, k;
int inf = 100000001;
void S_sort(int l, int r);
void T_sort(int l, int r);
int main(void)
{
int n;
int q;
int c = 0;
while (1) {
if (scanf("%d", &n) == EOF) {
break;
}
for (i = 0; i < n; i++) {
scanf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177056/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177056/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@inf = dso_local local_unna... |
#include<stdio.h>
int main()
{
int a,b,c,d,e,f,g,h,i,j,k;
scanf("%d %d %d %d",&a,&b,&c,&d);
e=(a+b+c+d);
if(e%2==1)
printf("NO");
else{
f=a+b;
g=c+d;
h=a+c;
i=b+d;
j=a+d;
k=b+c;
if(f==g || h==i || j==k || ((a+b+c)==d) || ((a+b+d)==c) ||... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1771/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1771/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 compare(const int *val1, const int *val2){
if(*val1 < *val2){
return -1;
}else if(*val1 == *val2){
return 0;
}else{
return 1;
}
}
int main(){
int i,n,S[100000]={0},q,C=0,T;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&S[i]);
}
qsort(S, n, siz... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177142/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177142/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[110];
char y[110];
int i;
scanf("%s",x);
scanf("%s",y);
for (i = 0; i < strlen(x); ++i)
{
if (x[i] < y[i])
{
printf("-1\n");
return 0;
}
}
printf("%s\n",y);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17720/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17720/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define W(A) (((A)+2)%3)
int h(char c){
if(c=='r') return 0;
if(c=='s') return 1;
return 2;
}
int main(void){
int n, i;
int k, j;
int p[3];
scanf("%d%d%d%d%d", &n, &k, p, p+1, p+2);
char *t = malloc(n+1);
scanf("%... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177243/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177243/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 2243: Step Step Evolution
// 2017.11.11 bal4u@uu
#include <stdio.h>
#define LEFT 0
#define RIGHT 1
#define check(l,r) ((tr[l])<=(tr[r]))
char a[100002];
int tr['9'+1];
int main()
{
int i, s, cnt, ans;
char *p, l, r;
tr['1'] = tr['4'] = tr['7'] = 1;
tr['2'] = tr['8'] = 2;
tr['3'] = tr['6'] =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177294/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177294/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@tr = dso_local local_unnam... |
//set many funcs template
//Ver.20190714
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177337/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177337/source.c"
target datalayout = "e-m:e-p270: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.sd = type { i32, i3... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
if(a<=0&&b>=0){printf("Zero");}
else if(a>=0&&b>=0){printf("Positive");}
else if((a-b+1)%2==0){printf("Positive");}
else{printf("Negative");}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177388/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177388/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(){
int a,b;
int count=0;
scanf("%d %d",&a,&b);
for (int i=0;i<b-a+1;i++){
if ((a+i)==0){
printf("Zero");
exit(0);
}
if ((a+i)<0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177430/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177430/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d%d", &a, &b);
count = b - a + 1;
if ((a > 0 && b > 0) || (a < 0 && b < 0 && count % 2 == 0))
printf("Positive\n");
else if (a < 0 && b < 0 && count % 2 == 1)
printf("Negative\n");
else
printf("Zero\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177474/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177474/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177517/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177517/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177568/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177568/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177610/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177610/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177669/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177669/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int
main (void)
{
int i, j;
while(EOF != scanf("%d %d", &i, &j)) {
printf("%d\n", i + j);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177733/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177733/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177777/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177777/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{ int a,b;
while(scanf("%d %d",&a,&b)!=EOF){
printf("%d\n",a+b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177834/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177834/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
char a[110][110]={};
scanf("%d%d", &h, &w);
for(int j=0; j<w+2; j++) a[0][j] = '#', a[h+1][j] = '#';
for(int i=1; i<h+1; i++){
scanf("%s", &a[i][1]);
a[i][0] = '#', a[i][w+1] = '#';
}
for(int i=0; i<h+2; i++) printf("%s\n", a[i]);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177878/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177878/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <unistd.h>
void get_nums(int *array, int count)
{
char c;
int num;
c = 0;
while (c != 10)
{
if (read(0, &c, 1) == -1)
return ;
if (c != 32)
{
num = 0;
while ('0' <= c && c <= '9')
{
num = num * 10 + c ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177920/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177920/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
short H, W, i, j;
char A[100][101];
int main(){
scanf("%hd %hd\n", &H, &W);
for(i=-2; i<W; ++i){
putchar('#');
}
putchar(10);
for(j=0; j<H; j++){
putchar('#');
for(i=0; i<W; ++i){
putchar(getchar());
}
putchar('#');
putchar(getchar());
}
for(i=-2; i<W; ++i){
putchar('#');
}
p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177964/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177964/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main()
{
int H,W,l,i;
char a[101][101];
scanf("%d%d",&H,&W);
for(i=0;i<H;i++)
{
scanf("%s",&a[i]);
}
l=W+2;
for(i=0;i<l;i++)
{
printf("#");
}
printf("\n");
for(i=0;i<H;i++)
{
printf("#%s#\n",a[i]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178020/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178020/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m,n,i,k,j;
char a[105];
scanf("%d%d",&m,&n);
for(i=1;i<=m;i++)
{
scanf("%s",a);
if(i==1)
{
for(j=1;j<=n+2;j++)
printf("#");
printf("\n");
}
for(j=0;j<n;j++)
{
if(n==1) { printf("#%c#\n",a[0]); break;}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178064/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178064/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(){
int m,n,i,j;
char str[100][100];
scanf("%d%d",&m,&n);
for(i=0;i<m;i++){
scanf("%s",str[i]);
}
for(i=0;i<n+2;i++){
printf("#");
}
printf("\n");
for(i=0;i<m;i++){
printf("#");
for(j=0;j<n;j++){
printf("%c",str[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178107/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178107/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int main(){
char** a/*[100][100]*/;
int h,w,i,j;
scanf("%d%d",&h,&w);
a=(char **)malloc(sizeof(char *)*h);
for(i=0;i<h;i++) a[i]=(char *)malloc(sizeof(char)*w);
for(i=0;i<h;i++) scanf("%s",a[i]);
printf("#");
for(i=0;i<w;i++)printf("#");
printf("#\n");
for(i=0;i<h;i++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178150/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178150/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,q;
scanf("%d %d",&n,&k);
int p[n],i;
for(i=0;i<n;i++){
scanf("%d",&p[i]);
}
int j;
for(i=0;i<n;i++){
for(j=i+1;j<n;j++){
if(p[i]>p[j]){
q=p[i];
p[i]=p[j];
p[j]=q;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178200/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178200/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
void sort(int* begin, int length){
for(int i=0;i<length-1;i++){
for(int j=i+1;j<length;j++){
if(*(begin+i) > *(begin+j)){
int temp = *(begin+i);
*(begin+i) = *(begin+j);
*(begin+j) = temp;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178244/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178244/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int compare_int(const void *a, const void *b)
{
return *(int*)a - *(int*)b;
}
int main(void)
{
int N, K;
int i = 0, ans = 0;
scanf("%d %d\n", &N, &K);
int p[N];
while (i < N)
scanf("%d", &p[i++]);
qsort(p, N, sizeof(int), compare_int);
i = 0;
while (i < K)
ans +... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178288/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178288/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 size,reps;
scanf("%d",&size);
scanf("%d",&reps);
int i=0;
int arr[size];
while(i<size)
{
scanf("%d",&arr[i]);
i++;
}
int sum=0,min[reps],j=0,l;
printf("\n");
for(i=0;i<size;i++)
{
for(l=0;l<size;l++)
{
if(arr[i]<arr[l])
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178381/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178381/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
typedef char Bool;
#define true 39
#define false 0
typedef long long int64;
typedef unsigned long long uint64;
typedef int int32;
typedef unsigned int uint32;
typedef unsigned char byte;
#pragma warning(disable:4996)
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <malloc.h>
int upsortcheck(const v... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178424/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178424/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#define N 1000
int n, k, p[N];
int compare_int(const void *a, const void *b)
{
return *(int*)a - *(int*)b;
}
int main(){
int sum=0;
scanf("%d %d",&n, &k);
for (int i = 0; i < n; i++){
scanf("%d",&p[i]);
}
qsort(p, n, sizeof(int), compare_int);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178468/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178468/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int compare_ints(const void* a, const void* b)
{
int arg1 = *(const int*)a;
int arg2 = *(const int*)b;
if (arg1 < arg2) return -1;
if (arg1 > arg2) return 1;
return 0;
}
int main(void)
{
int n;
int k;
int p[1001];
int i;
int sum;
scanf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178510/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178510/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// Aizu 2281: Swap Cipher
// 2017.9.23 bal4u@uu
#include <stdio.h>
char msg[101];
int a[100], b[100];
// ?°??????? x ????????????k??????????????????????????????????????????
// ex: x = 'x', k = 3 ???????????? 'a' ?????????
char nPosChar(char x, int k)
{
int p = x - 'a' + k;
if (p >= 26) p %= 26;
return p + 'a';
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178554/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178554/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 v1[100005],v2[100005];
int main(){
int n,m,i,x,y,resp=1;
scanf("%d%d",&n,&m);
if(m==0){
printf("%d\n",n-1);
return 0;
}
int cont=n;
for(i=0;i<m;i++){
scanf("%d%d",&x,&y);
if(x>y)
{
v1[x]++;
v2[y]++;
if(v2[x]==0 && v1[x]==1) cont--;
if(v1[y]==0 && v2[y]==1) cont--;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17890/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17890/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ... |
// Transformation.c
// 文字列 str に対して、与えられた命令の列を実行するプログラムを
// 作成してください。命令は以下の操作のいずれかです:
//
// ・print a b: strの a 文字目から b 文字目までを出力する。
// ・reverse a b: strの a 文字目から b 文字目までを逆順にする。
// ・replace a b p: strの a 文字目から b 文字目までを p に置き換える。
//
// ここでは、文字列 strの最初の文字を 0 文字目とします。
//
// 【入力】
// 1 行目に文字列 str が与えられます。strは英小文字のみ含みます。
// 2 ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178950/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178950/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.2 = private unnamed_a... |
#include<stdio.h>
#include<string.h>
int main() {
char str[1001], tem[1001], com[10];
int a, b, c, i, j;
scanf("%s", &str); // ?????????
scanf("%d", &a); // ????????°???
for (i = 0; i < a; i++){
scanf("%s", &com);
if (strcmp(com, "print") == 0) {
scanf("%d %d", &b, &c);
for (j = b; j < c + 1; j++) ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179007/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179007/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char str[1001], odr[8], rev[1001], rpl[1001];
int i, j, k, q, a, b;
scanf("%s", str);
scanf("%d", &q);
for (i=0; i<q; i++) {
scanf("%s", odr);
if (strcmp("print", odr) == 0) {
scanf("%d%d", &a, &b);
for (j=0; j<b-a+1; j++) printf("%c... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179050/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179050/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void)
{
char str[1000]; //????????????????????\??????
char rev[1000]; //reverse??¨??????????????\??????
char p[1000]; //??\???????????????????????\??????
char ordr[8]; //??????????????\??????
int num = 0; //???????????°
int a = 0; //??°?????????
int b = 0; //??°... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179094/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179094/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[1001],cmd[10],c,s[1001];
int i,j,q,a,b;
scanf("%s",&str);
scanf("%d",&q);
for(i=0;i<q;i++){
scanf("%s",&cmd);
if(strcmp(cmd,"print") == 0){
scanf("%d %d",&a,&b);
for(j=a;j<=b;j++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179144/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179144/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
// 入力文字を以下の法則に従って書き換え
// print a b : str の a 文字目から b 文字目までを出力する。
// reverse a b : str の a 文字目から b 文字目までを逆順にする。
// replace a b p : str の a 文字目から b 文字目までを p に置き換える。
int main()
{
char achInputText[1000];
int iQuestionNum;
char achQuestion[10];
char achReplaceText[1000];
int iIn... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179195/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179195/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int
main(void)
{
char str[1001];
char tmp[1001];
char cmd[16];
int a, b, q, l;
scanf("%s %d", str, &q);
for (int i = 0; i < q; i++) {
scanf("%s", cmd);
if (cmd[0] == 'p') {
scanf("%d %d", &a, &b);
l = b - a + 1;
memcpy(tmp, str + a, l);
tmp[l] = '\0';
p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179238/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179238/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[1001], name[10], temp, p[1000];
int q, a, b;
scanf("%s", str);
scanf("%d", &q);
for (int i=0; i<q; i++) {
scanf("%s", name);
if ((strcmp(name, "print")) == 0) {
scanf("%d %d", &a, &b);
for (int j=a;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179281/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179281/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
char t1[1510];
char t2[1510];
char t3[1510];
int main(){
int n;
int a,b;
int i,j;
char t;
scanf("%s",&t1);
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",&t3);
if(strcmp(t3,"replace")==0){
scanf("%d %d %s",&a,&b,&t2);
for(j=0;j<b-a+1;j++){
t1[a+j]=t2[j];
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179324/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179324/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 mat[9][9],check1[9][9],check2[9][9],check3[9][9],flag[9];
void reflesh(int *flag);
void c_check();
void d_check();
void mass_check(int x,int y);
int main(void){
int set;
int i,j,k;
scanf("%d",&set);
do{
for(i=0;i<9;i++){
for(j=0;j<9;j++){
scanf("%d",&mat[i][j]);
check1[i][j]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179382/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179382/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(){
char s[1010];
scanf("%s", s);
int ult = strlen(s) - 1;
if(s[ult] == 's'){
strcat(s, "es\0");
printf("%s", s);
}else{
strcat(s, "s\0");
printf("%s", s);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179432/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179432/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 buf[1001];
int len = 0;
memset(buf, 0x00, sizeof(buf));
scanf("%s", buf);
len = strlen(buf);
if (buf[len-1] == 's' ) {
printf("%ses", buf);
} else {
printf("%ss", buf);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179498/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179498/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(void){
char s[1001];
scanf("%s",s);
int c=strlen(s);
if(s[c-1]=='s'){
printf("%s",s);
printf("es\n");
}else{
printf("%s",s);
printf("s\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179540/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179540/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
int i,d[12];
float n,SM[12]={128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5, 0.25, 0.125, 0.0625};
while(1){
for(i=0;i<12;i++)
d[i] = 0;
scanf("%f",&n);
if(n == -1.0)
break;
for(i=0;i<12;i++){
if(n >= SM[i]){
d[i] = 1;
n = n - SM[i];
}
}
if(n == 0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179599/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179599/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define N 300001
int c[N], p[N], pc;
int main(void)
{
int i, j, n;
for(i=6;i<N;i+=(i%7==1)?5:2) if (!c[i]) {
p[pc++]=i;
for(j=i+i;j<N;j+=i) c[j]=1;
}
while (scanf("%d", &n), n-1) {
printf("%d:", n);
for(i=0;i<pc;++i) if (n%p[i]==0) printf(" %d", p[i]);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179649/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179649/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@c = dso_local local_unname... |
#include<stdio.h>
int main()
{
int a1,a2,a3,a4,s,flag=0;
scanf("%d %d %d %d",&a1,&a2,&a3,&a4);
s=a1+a2+a3+a4;
if(s%2==0)
{
s=s/2;
if(a1+a2==s || a1+a3==s || a1+a4==s || a1==s || a2==s || a3==s || a4==s)
printf("YES\n");
else
printf("NO\n");
}
else
printf("NO\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1797/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1797/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n,k,i,j,w[7] = {0};
int s[10][7] = {
{0,1,1,1,1,1,1},
{0,0,0,0,1,1,0},
{1,0,1,1,0,1,1},
{1,0,0,1,1,1,1},
{1,1,0,0,1,1,0},
{1,1,0,1,1,0,1},
{1,1,1,1,1,0,1},
{0,1,0,0,1,1,1},
{1,1,1,1,1,1,1},
{1,1,0,1,1,1,1}
};
while(scanf("%d",&n),n != -1){
for(i = 0;i <... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179793/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179793/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@__const.main.s = private u... |
// AOJ 0398 Beautiful Sequence
// 2019.3.25 bal4u
#include <stdio.h>
#include <stdlib.h>
#define MOD 1000000007
#define MAX 100000
int p2[MAX+5];
int f[MAX + 5];
int main()
{
int i, t;
int N, M;
// p2[n] = 2^n (2のペキ乗)
p2[0] = 1; for (i = 1; i <= MAX; i++) p2[i] = (p2[i - 1] << 1) % MOD;
scanf("%d%d", &N, &M)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179836/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179836/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@p2 = dso_local local_unnam... |
#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
#include<string.h>
#include<math.h>
typedef int32_t i32;
typedef int64_t i64;
typedef struct WBT_node {
i32 val;
i64 sum;
i32 size;
struct WBT_node *left;
struct WBT_node *right;
} node;
i32 get_size (const node *t) {
return t =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179887/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179887/source.c"
target datalayout = "e-m:e-p270: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.WBT_node = type { i... |
#include<stdio.h>
int main()
{
long n,q,t,k,j,c1=0,c0=0;
scanf("%ld %ld",&n,&q);
long int i,a[n];
for(i=0;i<n;i++)
{
scanf("%ld",&a[i]);
if(a[i]==1)
c1++;
else
c0++;
}
while(q--)
{
scanf("%ld %ld",&t,&k);
if(t==1)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17993/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17993/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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;
scanf("%d",&a);
printf("%d",(a/2)*((a+1)/2));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179980/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179980/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k,ans;
scanf("%d",&k);
if(k%2==0){
ans=(k/2)*(k/2);
}else{
ans=(k+1)/2*(k/2);
}
printf("%d",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180029/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180029/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int odd,even;
scanf("%d",&N);
odd=N/2;
even=N/2;
if(N%2!=0){
odd++;
}
printf("%d\n",odd*even);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180072/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180072/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int k;
scanf("%d" ,&k);
printf("%d" , (k/2)*((k+1)/2));
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180122/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180122/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int k, i;
int counter = 0;
scanf("%d", &k);
for(i = 1; i <= k; i++){
if(k % 2 == 0){
if(i % 2 == 0){
counter += k / 2;
}
else{
counter += k / 2;
}
}
else{
if(i % 2 == 0){
counter += k / 2 + 1;
}
else{
counter += k / 2;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180173/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180173/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
// Your code here!
int K;
scanf("%d",&K);
printf("%d\n",(K%2 == 0)? K*K/4:(K+1)*(K-1)/4);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180216/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180216/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[100010];
int main(){
long long int n,q,i,t,x,max,cnt=0;
scanf("%lld %lld",&n,&q);
for(i=1;i<=n;i++){
scanf("%lld",&a[i]);
if(a[i]==1)cnt++;//printf("%lld\n",cnt);
}
while(q--){
scanf("%lld%lld",&t,&x);
if(t==1){
a[x]=1-a[x];//printf("%lld|",a[x]);
if(a[x]==0)cnt=cnt-1;
else... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18026/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18026/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
long long gcd(int,int);
int main(){
long int a,b ; scanf("%ld%ld",&a,&b);
long long g= gcd(a,b);
printf("%lld\n",a*b/g);
return 0;
}
long long gcd(int x,int y){
int p;
p=x%y;
if(p==1) return 1;
else if(p==0) return y;
else return gcd(y,p);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180302/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180302/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define BUFSIZE 10000
int main(void){
int reminder[BUFSIZE]={0};
long a,b;
int i;
int m=0;
scanf("%d %d",&a,&b);
for(i=1;i<=a;i++){
if(a%i==0){
reminder[m]=i;
m++;
}
}
int n=0;
int N_reminder[BUFSIZE]={0};
for(int m=0;m<BUFSIZE;m++){
if(reminder[m]==0){
bre... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180346/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180346/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0;
scanf("%d", &t);
while (t-- > 0) {
int n;
scanf("%d", &n);
int flag = 0;
int a[2000];
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
int b[2000];
int k = 0;
for (int i = 0; i <... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18039/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18039/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 d,c,a,b;
scanf("%lld%lld",&a,&b);
d = a * b;
while(b != 0){
c = a % b;
a = b;
b = c;
}
printf("%lld\n", d / a);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180432/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180432/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#define LL long long
#define INF 1<<31-1
#define LNF 9223372036854775807
#define PI 3.14159265358979
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)<(y)?(y):(x))
#define FOR(i,a,n) for(i=a;i<n;i++)
#define MOD 100... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180476/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180476/source.c"
target datalayout = "e-m:e-p270: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>
#include <math.h>
int main(){
double a,b,c,d;
scanf("%lf %lf %lf %lf",&a,&b,&c,&d);
printf("%f",sqrt((d-b)*(d-b)+(c-a)*(c-a)));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180519/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180519/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
int main(void)
{
double x1 = 0, x2 = 0, y1 = 0, y2 = 0;
double ans=0;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
ans = sqrt( ((x1 - x2)*(x1 - x2)) + ( (y1 - y2)*(y1 - y2)) );
printf("%f\n",ans);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180562/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180562/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(){
double a,b,c,d;
scanf("%lf %lf %lf %lf",&a,&b,&c,&d);
printf("%lf\n",sqrt((a-c)*(a-c)+(b-d)*(b-d)));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180612/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180612/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
double x1, y1, x2, y2, shiki;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); //座標の入力
shiki=sqrt((pow(x2-x1, 2)+pow(y2-y1, 2))); //2点の距離の計算
printf("%f\n", shiki); //計算結果の出力
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180678/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180678/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(){
int A, B, N = 100, i, j;
scanf("%d%d", &A, &B);
char **C = (char **)malloc(sizeof(char *) * N);
for(i = 0; i < N; i++){
C[i] = (char *)malloc(sizeof(char) * (N + 1));
for(j = 0; j < N; j++){
if(i < N / 2){
C[i][j] = '.';
}
else{
C[i][j] = '#';... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180742/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180742/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include<string.h>
int main(void){
char c2[3];
char a[]={"A"};
char b[]={"B"};
char o[]={"O"};
int c1,aa=0,bb=0,oo=0,ab=0;
while(scanf("%d,%s", &c1, &c2)!=EOF){
if(strcmp(c2,a)==0)aa=aa+1;
else if(strcmp(c2,b)==0)bb=bb+1;
else if(strcmp(c2,o)==0)oo=oo+1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180786/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180786/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@__const.main.a = private u... |
#include <stdio.h>
int main(void)
{
int i, n;
char t[4];
int c[4];
for (i=0; i<4; ++i) c[i]=0;
while (scanf("%d,%s", &n, t) != EOF) {
switch (t[0]) {
case 'A': if (t[1]=='B') c[2]++; else c[0]++; break;
case 'B': c[1]++; break;
case 'O': c[3]++; break;
}
}
if (c[2] == 11) return 1;
for (i=0; i<4; ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180858/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180858/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(int argc, char const *argv[])
{
int i;
int num;
char str[100];
int blood_arr[4] = {0};
while(scanf("%d,%s", &num, str) != EOF) {
if(str[0] == 'A' && str[1] == '\0')
blood_arr[0]++;
else if(str[0] == 'B')
blood_arr[1]++;
else if(str[0] ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180915/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180915/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int sum=0;
int i,j,n,count=0;
int prime[105000]={0};
for(i = 2;i <= 105000;i++) prime[i]=1;
for(i = 2;i <= 105000;i++){
if(prime[i]){
for(j=i+i;j<=105000;j+=i) prime[j]=0;
prime[i]=++count;
}
}
while(scanf("%d",&n),n)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180959/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180959/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define MAX 1000000
#define sqrtMAX 1000
int main(void)
{
int n;
int b[MAX+1] = {0};
int i, j;
int sum;
int count;
// ツエツδ可トツスツテツネツスツづ個づ督づゥツつ「
b[0] = 1;
b[1] = 1;
for(i=4; i<=MAX; i+=2)
b[i] = 1;
for(i=3; i<=sqrtMAX; i+=2)
for(j=i+i; j<=MAX; j+=i)
b[j] = 1;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181000/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181000/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#define true 1
#define false 0
int IsPrime(int n){
if(n < 2) return false;
else if(n==2) return true;
else if(n%2 == 0) return false;
double sqrtNum = sqrt(n);
for (int i = 3; i <= sqrtNum; i += 2){
if (n % i == 0){
return false;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181059/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181059/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AtCoder ABC112: C - Pyramid
// 2020.1.29 bal4u
#include <stdio.h>
#include <stdlib.h>
typedef struct { int x, y, h; } T;
T tbl[105]; int N;
int cmp(const void *u, const void *v) {
return ((T *)v)->h - ((T *)u)->h;
}
int check(int x, int y, int h) {
int i, tx, ty, th;
for (i = 0; i < N; ++i) {
tx = tbl[i].x ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181123/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181123/source.c"
target datalayout = "e-m:e-p270: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.T = type { i32, i32... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include<math.h>
int main() {
int N,flag;
int x[101], y[101], h[101];
int H = 0;
scanf("%d", &N);
int i, j, k , c;
for (i = 0; i < N; i++) {
scanf("%d %d %d", &x[i], &y[i] , &h[i]);
}
for (i = 0; i < 101; i++) {
for (j = 0; j < 101; j++) {
flag... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181174/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181174/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <assert.h>
int n,i,j,x,a[10][10],list[200][3],size;
void push(int x,int y,int s){list[size][0]=i;list[size][1]=j;list[size][2]=s;size++;}
int check(int x,int y,int s){
int d;
if(s<3 && (x<1 || x>9 || y<1 || y>9)) return 0;
if(s==3 && (x<2 || x>8 || y<2 || y>8)) return 0;
d=a[x][y];
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181217/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181217/source.c"
target datalayout = "e-m:e-p270: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>
/* https://ncode.syosetu.com/n2267be/ */
#define RIZERO return 0
int main(void) {
int a, b, c, d;
if (scanf("%d%d%d%d", &a, &b, &c, &d) != 4) return 1;
puts(abs(a - c) <= d || (abs(a - b) <= d && abs(b - c) <= d) ? "Yes" : "No");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181282/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181282/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int main(void){
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
if(abs(a-c)<=d || ((abs(a-b)<=d) && (abs(b-c)<=d))){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181332/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181332/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int main(void){
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
if(abs(c-a)<=abs(d)){
printf("Yes\n");
}
else if(abs(b-a)<=abs(d)&&abs(c-b)<=abs(d)){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181376/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181376/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//set many funcs template
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181433/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181433/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a, b, c, d;
scanf("%d%d%d%d", &a, &b, &c, &d);
if (abs(a-c)<=d)
printf("Yes\n");
else {
if (a<=b && b<=c || c<=b && b<=a) {
if(abs(a-b)<=d && abs(b-c)<=d) printf("Yes\n");
else printf("No\n");
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181477/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181477/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int score[256][3] = {0};
int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++){
scanf("%d %d %d", score[i], score[i] + 1, score[i] + 2);
}
for (i = 0; i < 3; i++){
int num[128] = {0};
for (j = 0; j < n; j++){
num[s... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181527/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181527/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int n,i,o,r,sum;
scanf("%d",&n);
int a[200][3]={0};
for(i=0;i<n;i++){
for(o=0;o<3;o++){
scanf("%d",&a[i][o]);
for(r=i;r>=0;r--){
if(a[i][o] == a[r][o] && r!=i || a[i][o]*1000 == a[r][o] ){
if(a[r][o] <=100)
a[r][o]*=1000;
if(a[i][o] <=100)
a[i][... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181570/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181570/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.