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

Автор philolo1, 12 лет назад, По-английски

Hi everybody,
I just was wondering, what editor you are using during the contest (C++). I have been using kate for quite a while, but I am not really comfortible with it, the only need feature is, that I have my console down there. :)

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

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

Автор philolo1, 13 лет назад, По-английски
I just realised something: If you solved the problems of Division 2 and then you solve the problems of Division one, than the problems that are in both Divisions are counted not just once, but for every division.
I do not like it, because I want to know how many problems I solved on the problemset, but not committing the problems on Division one is not an option, because it looks like I did not solve them.

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

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

Автор philolo1, 13 лет назад, По-английски

Hi,
I just tried to solve some problem and the compiler of codeforces gave a different result.
UPD: I minimized the code a little bit.

Here is one Code
#include <iostream>
#include <stdio.h>
#include <memory.h>
#include <vector>
#include <set>
#include <math.h>
#include <algorithm>
#include <cstring>

using namespace std;

#define REP(a,b) for(int (a)=0;a<(int)b;a++)
#define PB push_back
#define s(a) scanf("%d",&a);
#define foreach(a,b) for(__typeof(b).begin() a  = b.begin(); a != b.end();a++)

vector<int> next[50];
bool visited[50];
int counter=0;

void DFS(int pos)
{
    if(!visited[pos])
    {
        visited[pos]=true;
       
        foreach(it,next[pos])
        {
            if(!visited[*it])
            {
                DFS(*it);
            }
        }
    }
}

int main()
{
    int N;int M;
    s(N);s(M);
   
    REP(n,M)
    {
        int a;
        int b;
        s(a);s(b);
        a--;
        b--;
        next[a].PB(b);
        next[b].PB(a);
    }
   
   
     if(N==M)
     {
        memset(visited,0,sizeof(visited));
       
        REP(n,N)
        {
            if(!visited[n])
            {
                counter++;
                DFS(n);
            }
        }
       
        cout<<"Counter "<<counter<<endl;
      }
      else
      {
        REP(n,N)
        {
            DFS(n);
        }
      } 
}

The input is
2 2
1 2
2 1

On my local machine it prints out 1, while on codeforces it prints out 2, which should be wrong.

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

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

Автор philolo1, 13 лет назад, По-английски
Hi everyone,
I use Codeforces a lot for practising, but sometimes I cannot solve the harder problems. The editorials really help me, but as the site grows, it is becomes more and more difficult to find the editorials. I would suggest, that there would be a separate column called editorial, but I think the link should not be shown until you click on it or something, so that you are not tempted to look at the editorial to quickly.

What do you think?

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

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

Автор philolo1, 13 лет назад, По-английски
I would like the feature, that you can see how many problems someone has solved on Codeforce. I like this feature very much on Spoj, but since the problems on Codeforce should not be copied to an other online judge, for reasons I understand, this feature would be nice .
What do you think?

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

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