Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
#include <string.h>
int main(){
char intra[10004];
int shift;
scanf("%d %s", &shift, intra);
for(int i = 0; intra[i] != '\0'; ++i){
intra[i] = ((intra[i]-'A') + shift)%26 + 'A';
}
printf("%s\n", intra);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253729/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253729/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,M,C;
int calc;
int ans=0;
scanf("%d%d%d",&N,&M,&C);
int A[N][M];
int B[M];
for (int i = 0; i < M; i++)
{
scanf("%d",&B[i]);
}
for (int i = 0; i < N; i++)
{
for (int j = 0; j < M; j++)
{
scanf("%d",&A[i][j]);
}
}
for (int i = 0; i < N; i++)
{
for (int j = 0; j < M; j+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253794/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253794/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, C, ac_count = 0, hoge = 0;
scanf("%d %d %d", &N, &M, &C);
int A[N][M], B[M];
// Bいれるやつ
for (int i = 0; i < M; i++) {
scanf("%d", &B[i]);
}
// A入れるやつ 2次元配列
for(int i = 0; i < N; i++) {
for(int j = 0; j < M; j++) {
scanf("%d", &A[i][j]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253837/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253837/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,C,B[20],A[20][20],i,j,c,sum;
scanf("%d %d %d",&N,&M,&C);
for(i=0;i<=M-1;i++){
scanf("%d",&B[i]);
}
for(i=0;i<=N-1;i++){
for(j=0;j<=M-1;j++){
scanf("%d",&A[i][j]);
}
}
c=0;
sum=0;
for(i=0;i<=N-1;i++){
for(j=0;j<=M-1;j++){
sum+=A[i][j]*B[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253880/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253880/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,c,count = 0;
int b[21];
scanf("%d %d %d",&n,&m,&c);
for (int i = 0; i < m; i++) {
scanf("%d",&b[i]);
}
for (int i = 0; i < n; i++) {
int ans = c;
for (int j = 0; j < m; j++) {
int a;
scanf("%d",&a);
ans += a * b[j];
}
if (ans > 0)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253923/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253923/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,i,j,tmp,ans=0;
scanf("%d %d %d\n",&n,&m,&c);
int b[m],a[n][m];
for(i=0;i<m;i++){
scanf("%d ",&b[i]);
}
for(i=0;i<n;i++){
for(j=0;j<m;j++){
scanf("%d ",&a[i][j]);
}
}
tmp = c;
for(i=0;i<n;i++){
for(j=0;j<m;j++){
c = c + a[i][j] ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253967/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253967/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,M,C,i,j;
int count =0,sum=0;
int B[30];
int A[30][30];
scanf("%d %d %d",&N,&M,&C);
for(i=0;i<M;i++){
scanf("%d",&B[i]);
//printf("B[%d]=%d ",i,B[i]);
}
for(i=0;i<N;i++){
for(j=0;j<M;j++){
scanf("%d",&A[i][j]);
//printf("%d",A[i][j]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254016/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254016/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void) {
int i,j,m;
char ch[9];
char c[8][9]={"vaporeon", "jolteon", "flareon", "espeon", "umbreon", "leafeon", "glaceon", "sylveon"};
scanf("%d",&i);
scanf("%s",ch);
for(i=0;i<8;i++)
{
m=-1;
if(strlen(ch)==strlen(c[i]))
{
m=0;
for(j=0;j<strlen(ch);j++)
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25406/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25406/source.c"
target datalayout = "e-m:e-p270: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.c = private unn... |
#include<stdio.h>
#include<string.h>
int min(int a,int b){
if(a > b)return b;
return a;
}
int main(void){
int n,cnt = 0,a = 0,b = 0,ab = 0;
scanf("%d",&n);
char s[12];
for(int i = 0;i < n;i++){
scanf("%s",&s);
for(int j = 1;j < strlen(s);j++){
if(s[j - 1] == 'A' && s[j] == 'B')cnt++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254102/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254102/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n;
char arr[10000][11];
int l[10000];
int type[3];
int main()
{
scanf("%d", &n);
int ans = 0;
for (int i = 0; i < n; i++)
{
scanf("%s", arr[i]);
l[i] = strlen(arr[i]);
for (int j = 0; j < l[i] - 1; j++)
{
if (arr[i][j] == 'A' && arr[i][j + 1] == 'B')
ans... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254146/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254146/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 KI_MAX 212345
int ki[KI_MAX];
void ki_init(void) {
int i;
for (i = 0; i < KI_MAX; i++) {
ki[i] = -1;
}
}
int ki_root(int node) {
if (ki[node] < 0) return node;
return ki[node] = ki_root(ki[node]);
}
int ki_size(int node) {
return -ki[ki_root(node)];
}
void ki_merge(int a, int b)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254210/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254210/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@ki = dso_local local_unnam... |
#include<stdio.h>
#include<math.h>
int main(void){
int x;
scanf("%d",&x);
for(int a=-188;a<=119;a++){
for(int b=-199;b<=118;b++){
if((pow(a,5))-(pow(b,5))==x){
printf("%d %d",a,b);
return 0;
}
}
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254254/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254254/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
long int a,b,c,d,e;
scanf("%ld",&a);
for(b=0;b<=400;b++){
for(c=-400;c<=400;c++){
if(b*b*b*b*b-c*c*c*c*c==a){
d=b;
e=c;
break;
}
}
}
printf("%ld %ld",d,e);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254298/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254298/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define F(i,a,n) for(int i=a; i<n; i++)
#define INF 100000000000 // long only
int main(){
long x;
scanf("%ld",&x);
int max=2000;
long a[max],b[max];
F(i,0,max){
a[i]=i;
b[i]=pow(i,5);
}
F(i,0,max){
F(j,0,max){
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254340/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254340/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <math.h>
#define max(x, y) ((x)>(y)?(x):(y))
#define sq(x) ((x)*(x))
#define dist(x, y, z, a, b, c) (sq(x-a)+sq(y-b)+sq(z-c))
double res, L[21], a[21], b[21];
int v[1<<21], n, m;
int popcount(int n)
{
int res=0;
while (n>0) { n-=n&-n; ++res; }
return res;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254384/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254384/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@v = dso_local local_unname... |
#include<stdio.h>
#include<math.h>
int main(void)
{
int x;
int h;
double s;
double takasa;
while(1){
scanf("%d %d", &x, &h);
if(x == 0 && h == 0){
break;
}
takasa = sqrt(((x/2.0) * (x/2.0)) + (h * h));
s = (x * x) + (x * takasa * 2);
printf("%lf\n", s);
}
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254441/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254441/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(){
int x,h;
for(;scanf("%d%d",&x,&h)&&(x||h);){
printf("%lf\n",x*x+sqrt(pow(x/2.0,2)+pow(h,2))*(2.0*x));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254485/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254485/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
long long primes[65] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61,
67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137,
139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211,
223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 2... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25455/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25455/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@primes = dso_local local_unn... |
#include <stdio.h>
#include <math.h>
int main(void) {
int d, w, h, n, r;
while (1) {
scanf("%d%d%d", &d, &w, &h);
if (h == 0) break;
scanf("%d", &n);
while (n--) {
scanf("%d", &r);
if (sqrt(d * d + w * w) / 2 < r)
printf("OK\n");
else if (sqrt(w * w + h * h) / 2 < r)
printf("O... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254607/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254607/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, l, h;
int n;
int i;
int x;
while (1){
scanf("%d %d %d", &w, &l, &h);
if (w == 0 && l == 0 && h == 0){
break;
}
if (w > h){
w += h;
h = w - h;
w -= h;
}
if (l > h){
l += h;
h = h -l;
l -= h;
}
if (w > l){
w += l;
l = w - l;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254658/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254658/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, const char * argv[])
{
float x, y;
float a, b, c, d, e, f;
while (scanf("%f %f %f %f %f %f",&a, &b, &c, &d, &e, &f) != EOF){
y = (a*f - c*d) / (a*e - b*d);
x = (c - b*y) / a;
printf("%.3f %.3f\n",x ,y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254708/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254708/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
double x,y,a,b,c,d,e,f;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
y=(a*f-d*c)/(a*e-d*b);
x=(c-b*y)/a;
printf("%.3f %.3f\n",x,y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254751/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254751/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
double a,b,c,d,e,f;
double x,y;
while(scanf("%lf",&a)!=EOF){
scanf("%lf %lf %lf %lf %lf",&b,&c,&d,&e,&f);
x=(c*e-b*f)/(a*e-b*d);
if(x==-0){
x=0;
}
y=(c*d-a*f)/(b*d-a*e);
if(y==-0){
y=0;
}
printf("%.3f %.3f\n",x,y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254795/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254795/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){
float a, b, c, d, e, f, x, y;
for(;scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF;){
y = (a*f-c*d)/(a*e-b*d);
x = (c-b*y)/a;
printf("%.3f %.3f\n", x, y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254838/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254838/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 swap(a,b) a^=b^=a^=b
int main(){
int a, b, c, d, e, f, B, C;
double A, D, E;
while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF){
B = c*e-b*f;
C = -d*c+a*f;
A = 1/(a*e*1.0-b*d*1.0);
D = A*(B*1.0);
E = A*(C*1.0);
if (D == -0.000000) D = 0.0000... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254881/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254881/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int a, b, c, d , e ,f ;
float x, y;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=-1){
x = (float)(c * e - b * f) / (a * e - b * d);
y = (float)(-d * c + a * f) / (a * e - b * d);
//x += 0.0005;
//y += 0.0005;
if (x <= 0 && x > -0.0005) x = 0;
if (y <= 0 && y > ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254924/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254924/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
double a,b,c,d,e,f,x,y,det;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!= EOF){
det = a*e - b*d;
x = 1.0/det * ( e*c - b*f);
y = 1.0/det * (-d*c + a*f);
if(-0.0005 < x && x < 0.0005){
x = 0.0;
}
if(-0.0005 ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254975/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254975/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
//float sisyagonyu(float i){
// int about, amari;
// about = i * 10000;
// amari = about % 10;
// if(amari < 5){
// about -= amari;
//}
// else{
// about = about + 10 - amari;
// }
// i = about / 10000;
// return i;
//}
int main(void){
float a, b, c, d, ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255017/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255017/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
double x=0,y=0;
int a,b,c,d,e,f,p=0,q=0,r=0,s=0;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)
{
p=a*e-b*d;
q=c*e-b*f;
x=(double)q/p;
r=b*d-a*e;
s=c*d-a*f;
y=(double)s/r;
if(x==-0)x=0;
if(y==-0)y=0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255082/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255082/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
double a,b,c,d,e,f,bb,cc,ee,ff,x,y;
for(;;){
if(scanf("%lf",&a)==EOF){break;}
scanf("%lf",&b);
scanf("%lf",&c);
scanf("%lf",&d);
scanf("%lf",&e);
scanf("%lf",&f);
bb=b*d;
cc=c*d;
ee=e*a;
ff=f*a;
y=(cc-ff)/(bb-ee);
x=(c-b*y)/a;
printf("%.3lf %.3lf\n",x,y);
}
re... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255132/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255132/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main() {
double a, b, c, d, e, f;
double x, y;
/* ax + by = c
dx + ey = f */
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
x = (e * c - b * f) / (e * a - b * d) + 0.00001;
y = (d * c - a * f) / (d * b - a * e) + 0.00001;
printf("%.3f %.3f\n", x, y);
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255183/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255183/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 xs[2], ys[2], eqs[2];
float x, y;
while (~scanf("%d %d %d %d %d %d", xs, ys, eqs, xs + 1, ys + 1, eqs + 1)){
x = 1.*(eqs[0] * ys[1] - eqs[1] * ys[0]) / (xs[0] * ys[1] - xs[1] * ys[0]);
y = 1.*(eqs[1] * xs[0] - eqs[0] * xs[1]) / (xs[0] * ys[1] - xs[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255226/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255226/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
double a,b,c,d,e,f,x,y;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF)
{
y=(c*d-a*f)/(b*d-a*e);
x=(c*e-b*f)/(a*e-b*d);
if(x==0)
x=0.0;
if(y==0)
y=0.0;
printf("%.3lf %.3lf\n",x,y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255284/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255284/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
double a,b,c,d,e,f;
double x,y;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
y = (c * d - a * f) / (b * d - a * e);
x = (c - b * y) / a;
x = (double)((int)(x * 10000)/10)/1000;
y = (double)((int)(y * 10000)/10)/1000;
printf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255327/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255327/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)
{
float a, b, c, d, e, f;
while (scanf("%f%f%f%f%f%f", &a, &b, &c, &d, &e, &f) != EOF)
printf("%.3f %.3f\n", (-b*f+c*e)/(a*e-b*d)+0.00001, (-c*d+a*f)/(a*e-b*d)+0.00001);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255370/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255370/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
typedef struct directedGraph{
int *vertex;
int *next;
int *start;
int v,e;
int pointer;
} graph;
graph* newGraph(const int v,const int e){
graph *g=(graph *)malloc(sizeof(graph));
g->vertex=(int *)calloc(e,sizeof(int));
g->next=(int *)calloc(e,sizeof(int));
g->st... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255413/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255413/source.c"
target datalayout = "e-m:e-p270: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.directedGraph = typ... |
#include <stdio.h>
int main(void)
{
int n,k,i,s=0;
scanf("%d%d",&n,&k);
int x[n];
for(i=0;i<n;i++)
scanf("%d",&x[i]);
for(i=0;i<n;i++){
if(x[i]*2<(k-x[i])*2) s+=x[i]*2;
else s+=(k-x[i])*2;
}
printf("%d\n",s);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255464/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255464/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0, total = 0, A = 0, B = 0;
scanf("%d %d", &N, &K);
int ball_position[N];
while (i < N) {
scanf("%d", &ball_position[i]);
i++;
}
for (i = 0; i < N; i++) {
A = ball_position[i] * 2;
B = (K - ball_position[i]) * 2;
if (A < B)
total += A;
else
total +... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255507/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255507/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int i;
int ans = 0;
scanf("%d %d", &N, &K);
for(i = 0; i < N; i++) {
int x;
scanf("%d", &x);
if(x < K - x) ans += 2 * x;
else ans += 2 * (K - x);
}
printf("%d\n", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255558/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255558/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
static int n, k, x, i, sum;
int abs(int x) {
return x >= 0 ? x : -x;
}
int min(int x, int y) {
return x <= y ? x : y;
}
int main(void) {
scanf("%d%d", &n, &k);
for (i = 0; i < n; ++i) {
scanf("%d", &x);
sum += 2 * min(x, abs(k - x));
}
printf("%d\n", sum);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255600/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255600/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, div2[3] = {0};
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a);
if (a % 4 == 0) {
div2[2]++;
} else if (a % 2 == 0) {
div2[1]++;
} else {
div2[0]++;
}
}
if (div2[1] != 0) {
div2[0]++;
}
if (div2[0] <= div2[2] + 1) {
printf("Yes\n");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255644/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255644/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,tot,max;
max=tot=0;
scanf("%d",&n);
for(j=0;j<n;j++)
{scanf("%d",&i);
if(i%2!=0) tot++;
if(i%4==0) max++;
}
if(max>=tot||(tot-max==1&&tot+max==n)) printf("Yes");
else printf("No");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255688/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255688/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N=0;
int a[100000]={};
int t=0,f=0,n=0;
scanf("%d",&N);
for(int i=0;i<N;i++){
scanf("%d",&a[i]);
if((a[i]%4)==0)f++;
else if((a[i]%2)==0)t++;
else n++;
}
if((N<=f*2+t) || (N==f*2+1))printf("Yes");
else printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255730/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255730/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <stdbool.h>
typedef long long int lint;
typedef struct _tag_attak{
lint damage;
lint cost;
} attack_t;
void optimize_graph_init(lint *graph, lint H, attack_t attack){
lint index = attack.damage;
lint count = 1;
while(index < H){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255774/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255774/source.c"
target datalayout = "e-m:e-p270: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._tag_attak = type {... |
// AOJ 0572: Card Game is Fun
// 2017.10.29 bal4u@uu
#include <stdio.h>
int a[5003], b[5003];
char buf[25105], *p;
int getint()
{
int n = 0;
while (*p >= '0') n = (n<<3) + (n<<1) + (*p++ & 0xf);
return n;
}
int main()
{
int la, lb, i, j, ans;
fgets(p=buf, 16, stdin), la = getint(), p++, lb = getint();
fgets(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255817/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255817/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@p = dso_local local_unname... |
#include<stdio.h>
#include<string.h>
int main()
{
char t[300000];
char *p, *c;
int i,m=0;
scanf("%s", &t);
p = t;
c = p;
m = strlen(p);
for (i = 0; i < m; i++)
{
if (i == 0) {
if (*p == '?')
*p = 'D';
}
else if (i == m - 1) {
if (*p == '?')
*p = 'D';
}
if(*p=='?'){
if (*(p - 1) == ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255875/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255875/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() {
long long a;
char T[200001];
scanf("%s",T);
a=strlen(T);
for(int i=0;i<a;i++){
if(T[i]=='?'){
T[i]='D';
}
}
printf("%s",T);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255918/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255918/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long int n, a, b;
long long int h[100005];
int f(long long int x)
{
long long int count = 0;
int i;
for (i = 0; i < n; i++)
if (h[i] - x * b > 0)
count += (h[i] - x * b + a - b - 1) / (a - b);
if (count <= x)
return 1;
else
return 0;
}
int main()
{
scanf("%lld %lld %lld", &n, &a, &... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255961/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255961/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@n = dso_local global i64 0... |
#include <stdio.h>
#include <string.h>
int main(void)
{
int n;
int a, b, c;
int cal[100];
int i, j;
int tmp;
int max_cal;
int sum_cal;
scanf("%d%d%d%d", &n, &a, &b, &c);
for (i = 0; i < n; i++){
scanf("%d", &cal[i]);
}
for (i = 0; i < n; i++){
for (j = 0; j < n - 1; j++){
if (cal[j] < cal[j + 1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256003/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256003/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int n,a,b,c,d[101],i,j,t;
scanf("%d %d %d %d",&n,&a,&b,&c);
for(i=0;i<n;i++)scanf("%d",&d[i]);
for(i=n-1;i>0;i--)
for(j=0;j<i;j++)
if(d[j]<d[j+1])
t=d[j],d[j]=d[j+1],d[j+1]=t;
for(i=0;i<n;i++)
if((c + d[i])/(a+b)>=c/a)c+=d[i],a+=b;
else break;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256047/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256047/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#define ll long long
#define mod 1000000007
ll n,k;
ll a[212345];
char z;
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
v... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256098/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256098/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void)
{
int a,b,c[25],n;
for(;;)
{
n=32;
scanf("%d",&a);
for(b=0;b<a;b++)
scanf("%d",&c[b]);
if(a==0)
break;
for(b=0;;b++)
{
if(b==a)
b=0;
if(n>(n-1)%5)
n-=(n-1)%5;
else
n=1;
printf("%d\n",n);
if(n!=1)
n-=c[b];
else
n=0;
printf("%d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256148/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256148/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
double siz[40];
int i, j;
int grade[6] = {0, 0, 0, 0, 0, 0};
scanf("%d", &n);
for (i = 0; i < n; i++){
scanf("%lf", &siz[i]);
if(siz[i] >= 185.0){
grade[5]++;
}
else if(siz[i] >= 180.0){
grade[4]++;
}
else if(siz[i] >= 175.0){
grade[3]++;
}
e... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256191/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256191/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void)
{
int i,n;
double len;
char data[6][50]={
{"1:"},
{"2:"},
{"3:"},
{"4:"},
{"5:"},
{"6:"}
};
scanf("%d",&n);
for(i=0; i<n; i++){
scanf("%lf",&len);
if(len<165.0)
strcat(data[0],"*");
else if(len<170.0)
strcat(data[1],"*");
else if(le... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256263/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256263/source.c"
target datalayout = "e-m:e-p270: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.data = privat... |
#include <stdio.h>
int main(){
int X;
scanf("%d", &X);
if(X == 7 || X == 5 || X == 3){
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256306/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256306/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 judge(int);
int main()
{
int ans[1005];
int t;
int top=0;
scanf("%d",&t);
for(int i=1;top<1003;i++)
{
if((i%3==0)||(judge(i)==0))
continue;
else
ans[top++]=i;
}
int tt;
for(int i=0;i<t;i++)
{
scanf("%d",&tt);
printf("%d\n",ans[tt-1]);
}
return 0;
}
int judge(int n)
{
int t... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25640/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25640/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(){
int X;
scanf("%d", &X);
if(X==5 || X==7 || X== 3){
printf("YES");
}else{
printf("NO");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256443/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256443/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 input;
scanf("%d",&input);
if (input == 3 || input == 5 || input == 7) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256487/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256487/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
int r = 0,c = 0,k = 0,v = 0;
k = (int)sqrt(n);
v = k;
if(k*k != n)
k += 1;
int s = k*k - (k-1);
if(n ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25653/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25653/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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);
if(a==3||a==5||a==7)
printf("YES\n");
else
printf("NO\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256580/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256580/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 X = 0;
scanf("%d", &X);
if (X==7||X==5||X == 3) {
printf("YES");
}
else {
printf("NO");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256630/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256630/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 X;
scanf("%d", &X);
if(X == 3 || X == 5 || X == 7) {
printf("YES\n");
} else {
printf("NO\n");
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256674/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256674/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 fun(char *);
int fun(char *s)
{
int px1=0,px2=0,py1=0,py2=0;
while(*s)
{
if(*s=='E')
{
px1++;
}
if(*s=='W')
{
px2++;
}
if(*s=='N')
{
py1++;
}
if(*s=='S... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256731/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256731/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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];
int count[4]= {}, i, check= 0;
scanf("%s", str);
for(i= 0; i< strlen(str); i++)
{
switch(str[i])
{
case 'N':
count[0]++;
break;
case 'S':
count[1]++;
break;
case 'W':
count[2]++;
break;
case 'E':
count[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256775/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256775/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 2222 Alien's Counting
// 2018.4.25 bal4u
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#define MAX_V 1002
int V; // 頂点数
int *to[MAX_V], hi[MAX_V], lim[MAX_V];
int *r_to[MAX_V], r_hi[MAX_V], r_lim[MAX_V];
int vs[MAX_V], vsz;
char used[MAX_V];
int cmp[MAX_V]; // 属する強連結成分のトポロジカル順序
void ch... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256818/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256818/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct._IO_FILE = type { i... |
#include <stdio.h>
int main(void) {
int m, nmin, nmax, p[200], i, dif[200], max, ans;
while (1) {
scanf("%d %d %d", &m, &nmin, &nmax);
if (m == 0 && nmin == 0 && nmax == 0) return 0;
for (i = 0; i < m; i++)
scanf("%d", &p[i]);
for (i = 0; i < 200; i++)
dif[i] = 0;
for (i = nmin ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256861/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256861/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#pragma GCC optimize("Ofast")
#include<stdio.h>
int main(void)
{
long n = 0;
char c=getchar_unlocked();
while(c<='9'&&c>='0') {n=(n<<1)+(n<<3)+c-'0'; c=getchar_unlocked();}
long ans = 0;
++n;
int u, v, i = 1;
while(++i < n)
{
u = v = 0;
c=getchar_unlocked();
while... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256904/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256904/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct._IO_FILE = type { i... |
#include<stdio.h>
int main()
{
int p,q,r,s,t,u,i,j,n;
scanf("%d",&n);
int a[n],b[n],c[n];
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
scanf("%d",&b[i]);
scanf("%d",&c[i]);
}
int dp1[n],dp2[n],dp3[n];
dp1[0]=a[0];
dp2[0]=b[0];
dp3[0]=c[0];
for(i=1;i<n;i++)
{
p=a[i]+dp2[i-1];
q=a[i]+dp3[i-1];
r=b[i]+dp1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256948/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256948/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(a,b) ((a) > (b) ? a : b)
int main(void){
// Your code here!
int N;
int a[100001],b[100001],c[100001];
int dp[200001][4];
int i,j,k;
int ans;
scanf("%d",&N);
for(i=1;N>=i;i++){
scanf("%d %d %d\n",&a[i],&b[i],&c[i]);
}
dp[0][1] =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256991/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256991/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 INF -1E9
int n,*sat;
long *dp;
int pos(int i,int j)
{
return i*3+j;
}
void chMax(long *a,long b)
{
if (*a<b) *a = b;
return;
}
int main(void)
{
int i,j;
long ans;
scanf("%d",&n);
sat = (int *) malloc(sizeof(int) * 3*n);
for (i=0;i<n;i++) scanf("%d %d %d",&sat[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257033/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257033/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main () {
int a,b,c,d,n;
scanf ("%d", &n);
a = n/1000;
b = (n-1000*a)/100;
c = (n-1000*a-100*b)/10;
d = n%10;
if (a+b+c+d==7) {
printf("%d+%d+%d+%d=7\n", a,b,c,d);
} else if (a+b+c-d==7) {
printf("%d+%d+%d-%d=7\n", a,b,c,d);
} else if (a+b-c+d==7) {
printf("%d+%d-%d+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257077/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257077/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int n;
scanf("%d", &n);
if(n%2==0)
{
printf("Mahmoud");
}
if(n%2==1)
{
printf("Ehab");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25712/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25712/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <math.h>
#include <string.h>
long long int i,j;
int main(void){
char s[10];
scanf("%s",s);
int a=s[0]-'0',b=s[1]-'0',c=s[2]-'0',d=s[3]-'0';
if(a+b+c+d==7) printf("%d+%d+%d+%d=7\n",a,b,c,d);
else if(a+b+c-d==7) printf("%d+%d+%d-%d=7\n",a,b,c,d);
else if(a+b-c+d==7) pr... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257163/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257163/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[5];
scanf("%s",s);
int i,num[4];
for(i=0;i<4;i++)num[i]=s[i]-'0';
int j,k;
for(i=0;i<2;i++){
for(j=0;j<2;j++){
for(k=0;k<2;k++){
int ans=0,l;int tmp[3]={i,j,k,};
ans+=num[0];
for(l=0;l<3;l++){
if(tmp[l]==0){
ans+=num[l+1];
}
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257206/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257206/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a;
scanf("%d",&N);
if(N%2==0) printf("Mahmoud");
else printf("Ehab");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25725/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25725/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
int s[4];
int a[4];
int main()
{
int n;
scanf("%d",&n);
for(int i=0;i<4;i++){
a[i]=n%10;
n/=10;
}
for(int i=0;i<4;i++){
s[i]=a[3-i];
}
if(s[0]+s[1]+s[2]+s[3]==7){ printf("%d+%d+%d+%d=7",s[0],s[1],s[2],s[3]);return 0;}
if(s[0]+s[1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257293/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257293/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
int gcd(int a,int b){
if(a<b){
int now=a;
a=b;
b=a;
}
int r=a%b;
while(r!=0){
a=b;
b=r;
r=a%b;
}
return b;
}
/* 値を入れ替える関数 */
void swap (int *x, int *y) {
int temp; // 値を一時保存する変数
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257343/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257343/source.c"
target datalayout = "e-m:e-p270: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>
#define df 0
int main(){
int n,a,s,i;
scanf("%d",&n);
s=-n;
for(i=0;i<n;i++){
scanf("%d",&a);
s+=a;
}
printf("%d\n",s);
return 0;
}
/// confirm df==0 /// | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257387/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257387/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<math.h>
int main()
{
int n;
scanf("%d", &n);
int a[n+10];
int i;
for(i=0; i<n; i++)
{
scanf("%d", &a[i]);
}
int ans=0;
for(i=0; i<n; i++)
{
ans += a[i]-1;
}
printf("%d\n", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257437/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257437/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n , *a,i,ans;
scanf("%d" , &n);
a = (int*)malloc(sizeof(int)*n);
for(i=0;i<n;i++)
scanf("%d" , &a[i]);
ans=0;
for(i=0;i<n;i++){
ans+=a[i]-1;
}
printf("%d\n" , ans);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257480/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257480/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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()
{
unsigned long long int n,sum=0,i;
scanf("%llu",&n);
unsigned long long int a[n];
for(i=1;i<=n;i++)
{
scanf("%llu",&a[i]);
sum=sum+a[i];
}
printf("%llu",(sum-n));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257530/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257530/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0;
char password[20];
int check = 0b0000;
scanf("%s", password);
do{
if(password[i]>='0'&&password[i]<='9') check |= 0b0001;
if(password[i]>='a'&&password[i]<='z') check |= 0b0010;
if(password[i]>='A'&&password[i]<='Z') check |= 0b0100;
i++;
}while(password[i] !... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257581/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257581/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 e1,e2,e3,e4;
scanf(" %d %d %d %d",&e1,&e2,&e3,&e4);
if(e1==e2 && e3==e4 || e2==e4 && e1==e3 || e1==e4 && e2==e3){
printf("yes\n");
}
else{
printf("no\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257624/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257624/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 3, stdin), p1 == p2) ? EOF : *p1++)
char buf[3], *p1 = buf, *p2 = buf;
inline int read() {
char c = getchar(); int x = 0, f = 1;
while(c < '0' || c > '9') {if(c == '-') f = -1; c = getchar();}
while(c >= '0' && c <= '9') x = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257675/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257675/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@buf = dso_local global [3 ... |
//set many funcs template
//Ver.20180717
#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_257718/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257718/source.c"
target datalayout = "e-m:e-p270: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 { i32, ... |
#include <stdio.h>
int main(void){
// Your code here!
int a,b,n;
scanf("%d%d%d",&a,&b,&n);
for(int i=0;i<n;i++){
if(i%2==0){
a=a/2;
b=b+a;
}
else{
b=b/2;
a=a+b;
}
//printf("%d %d %d \n",i,a,b);
}
printf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257761/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257761/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
int i;
int a,b,k;
int p,q;
scanf("%d %d %d",&a,&b,&k);
for(i=1; i<=k; i++){
if(i%2==1){
if(a%2==0){
p = a/2;
}else if(a%2!=0){
a = a-1;
p = a/2;
}
a = p;
b = b + p;
}else{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257804/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257804/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s;
scanf("%d%d",&k,&s);
int count=0;
int x,y;
for(x=0;x<=k;x++){
for(y=0;y<=k;y++){
if(0<=s-x-y && s-x-y<=k)
count++;
}
}
printf("%d\n",count);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257848/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257848/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, s, count = 0;
scanf("%d%d", &k, &s);
for(int i=0; i <= k; i++) {
for(int j=0; j <= k; j++) {
int l = s - i - j;
if(l >= 0 && l <= k)
count++;
}
}
printf("%d", count);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257891/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257891/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, s, valores = 0;
scanf("%d %d", &k, &s);
for (int x = 0; x <= k; x++){
for (int y = 0; y <= k; ++y){
int z = s - x - y;
if (0 <= z && z <= k)
valores += 1;
}
}
printf("%d\n", valores);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257934/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257934/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long int s,k,i,j,z,count=0;
scanf("%ld%ld",&k,&s);
for(i=0; i<=k; i++)
{
for(j=0; j<=k; j++)
{ z=s-i-j;
if(z>=0 && z<=k)
{ count++; }
}
}
printf("%ld",count);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257978/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257978/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
int main(){
ll k,s;
scanf("%lld%lld",&k,&s);
ll ans=0;
rep(x,0,k+1)rep(y,0,k+1){
ll z=s-x-y;
if(0<=z&&z<=k)ans++;
}
pri... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258027/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258027/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 descending_compare(const void *a, const void *b){
if (*(int*)a > *(int*)b){
return -1;
}else if (*(int*)a == *(int*)b){
return 0;
}else{
return 1;
}
}
int ascending_compare(const void *a, const vo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258070/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258070/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, s;
int xmin, xmax, x;
int ymin, ymax;
int res = 0;
scanf("%d %d", &k, &s);
xmin = s - 2 * k;
if(xmin < 0) xmin = 0;
xmax = k;
if(s < xmax) xmax = s;
for(x = xmin; x <= xmax; x++){
ymin = s - x - k;
if(ymin < 0) ymin = 0;
ymax = k;
if(s - x < k) ymax = s - x;
re... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258113/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258113/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 stack(int);
int main(int argc, char const *argv[])
{
int input, data;
while(1){
if(scanf("%d", &input) == EOF){
break;
}
data = stack(input);
if(data != 0){
printf("%d\n", data);
}
}
return 0;
}
int stack(int x){
static int box[100];
static int num = 0;
if(x == 0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258164/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258164/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 stack_data[10];
int stack_num=0;
int tmp = 0;
int i;
while(scanf("%d", &tmp) != EOF) {
if(tmp!=0) {
stack_data[stack_num] = tmp;
stack_num++;
} else {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258214/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258214/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]={}, n[110]={}, i=0, j=0;
while(scanf("%d", &a[i])!=EOF){
if(a[i]!=0){
n[j]=a[i];
j++;
}
if(a[i]==0){
printf("%d\n", n[j-1]);
j--;
}
i++;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258258/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258258/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100],c=0;
while(1){
scanf("%d",&k);
if(k==0&&c!=0){
printf("%d\n",i[c-1]);
c--;
}else if(k!=0&&k<=10){
i[c]=k;
c++;
}else break;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258308/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258308/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define PUSH intStackPush
#define POP intStackPop
#define TOP intStackTop
#define FREE intStackFree
typedef struct stack{ int data; struct stack* next; }stack;
stack *top = NU... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258388/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258388/source.c"
target datalayout = "e-m:e-p270: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>
int main()
{
int ikidomari[100];
int out[100];
int i=0,k=0;
while(scanf("%d", &ikidomari[i])!=EOF){
if(ikidomari[i]!=0){
i++;
}
else{
i--;
out[k]=ikidomari[i];
k++;
}
}
for(i=0; i<k; i++){
printf("%d\n", out[i]);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258438/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258438/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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.