Блог пользователя pop1912

Автор pop1912, история, 2 года назад, По-английски

Well, I'm an Anime fan and got to CP now. Just thinking that there are many Otakus in CF. Does cp's become otakus or the other way around.

BTW, here's an example:

cf-ryuk

Полный текст и комментарии »

  • Проголосовать: нравится
  • -20
  • Проголосовать: не нравится

Автор pop1912, история, 2 года назад, По-английски

Hi All,

Happy New Year, Could anyone please share some Ladders. I came across this ladder, it will be helpful for beginners also.

a2oj Ladder

Thanks in Advance, pop1912

Полный текст и комментарии »

  • Проголосовать: нравится
  • -7
  • Проголосовать: не нравится

Автор pop1912, история, 3 года назад, По-английски

Hi, I'm using "cin.ignore()" to ignore the input. I want only the 2nd integer to be displayed for this sample Input, I'm getting WA for some Test Cases, What is wrong in my code?:

Testcase 1:(Output should be "1")

2 1
carrots?
bunnies

Testcase 2:(Output should be "5")

1 5
sovl problmz

My Code:

#include<iostream>
using namespace std;

int main() {
    int a;
    cin.ignore();
    cin>>a;
    cin.ignore();
    
    cout<<a;
    
    return 0;
}

Полный текст и комментарии »

  • Проголосовать: нравится
  • -22
  • Проголосовать: не нравится

Автор pop1912, история, 3 года назад, По-английски

Hi, Can you help me in this CSES Two Sets problem?.

Statement:

Your task is to divide the numbers 1,2,…,n into two sets of equal sum.

Input

The only input line contains an integer n.

Output

Print "YES", if the division is possible, and "NO" otherwise.

After this, if the division is possible, print an example of how to create the sets. First, print the number of elements in the first set followed by the elements themselves in a separate line, and then, print the second set in a similar way.

Constraints 1≤n≤106

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор pop1912, история, 3 года назад, По-английски

Hi, Could you help me in this problem. "https://codeforces.com/problemsets/acmsguru/problem/99999/100".

My solution is my-submission. I'm getting WA, help me identify the mistake.

#include<iostream>
#include<fstream>
using namespace std;

int  main() {
    ifstream fin("input.in");
    ofstream fout("output.out");
    
    int a,b;
    fin>>a>>b;
    
    fout<<a + b<<"\n";
    
    return 0;
}

Thanks, pop1912

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор pop1912, история, 3 года назад, По-английски

I have mistakenly used this user name, now I want to change to other but I can't see that option in the settings, Please help me...

Полный текст и комментарии »

  • Проголосовать: нравится
  • -20
  • Проголосовать: не нравится