Cod sursa(job #2058993)

Utilizator GabiTulbaGabi Tulba-Lecu GabiTulba Data 6 noiembrie 2017 15:43:58
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.71 kb
#include <bits/stdc++.h>

#define MaxN 312501
#define MOD 1000000007
#define INF 2140000000

FILE *IN,*OUT;
int a,b,s;

int main()
{
    IN=fopen("test.in","r");

    fscanf(IN,"%d%d",&a,&b);

    std::string A,U="X";
    OUT=fopen("test.out","w");
    for(;a;a--)A+=U;

    fprintf(OUT,"%s",A.c_str());

    fclose(OUT);

    OUT=fopen("test.out","r");

    fscanf(OUT,"%s",A.c_str());

    fclose(OUT);

    for(;b;b--)A+=U;

    OUT=fopen("test.out","w");

    fprintf(OUT,"%s",A.c_str());

    fclose(OUT);

    OUT=fopen("test.out","r");

    fscanf(OUT,"%s",A.c_str());

    fclose(OUT);

    OUT=fopen("test.out","w");

    fprintf(OUT,"%d",A.size());

    return 0;
}