By Tornad0, history, 4 years ago,

http://acm.uestc.edu.cn/#/problem/show/1296

• -6

By Tornad0, history, 4 years ago,

Is there anyone play overwatch on codeforces? or Starcraft. Lets' play together before the next codeforces round :D

• -30

By Tornad0, history, 4 years ago,

Hello everyone, I am a student who like to take contests in codeforces. I usaully visit this site before.

However, from last month, I fall in love with a girl. So I have no time to visit codeforces:(((

How are you guys? Have you had a girlfriend like me? Wish you happy coding and high rating:)))) I will go out with her for dinner tonight.

PS: the following is my girlfriend:)))

• -111

By Tornad0, history, 4 years ago,

I upgrated my windows 7 to windows 10. After a month, there is always internet connection problem on windows 10. anyone have the same issue? any solution? However I can't go back to windows7 now:( damn it win10

• 0

By Tornad0, history, 4 years ago,

Hi, today I learned Trie:D and I solved a easy problem. Here is my code on the problem

# include

int const N = 1000002; int const BITS = 31;

int link[N * BITS][2]; int a[N], num[N * BITS];

int main() { int n, k; //read the cutest data:D scanf("%d%d", &n, &k); for(int i=1;i<=n;i++)scanf("%d",&a[i]); for (int i = 1; i <= n; i++) a[i] ^= a[i — 1]; int freak = 2; int root = 1; long long ans = 0; for (int i = 0; i <= n; i++) { int v = root; //get all that less than K :D for (int b = BITS — 1; b >= 0 && v > 0; b--) { int curAi = (a[i] >> b) & 1; int curK = (k >> b) & 1; if (curK == 1) { if (link[v][curAi] > 0) { ans += num[link[v][curAi]]; } } v = link[v][curAi ^ curK]; } v = root;

//insert a[i] to trie:D
for (int b = BITS - 1; b >= 0; b--) {
num[v]++;
int cur = (a[i] >> b) & 1;
}
}
num[v]++;

} //ans get those less than K:D printf("%I64d\n", (long long) n * (n + 1) / 2 — ans); }

That's all. **** I will be back:D

• -51

By Tornad0, history, 4 years ago,

Hello:D

Today I tried to create another account on codeforces (because I have too many downvote on this account, -100 now:D).

However I can't enter in captcha:( what a awful site:D Anyone know how to fix this problem? thanks:D

That's all, I will be back

• -38

By Tornad0, history, 4 years ago,

Hi all,

How to detect odd circle?

Edit:I find how to do it now:D downvote me if you are too stupid to solve this.

• -32

By Tornad0, history, 4 years ago,

Hi all, I have a problem when I want to do conjunction on a union without overflow. My problem is:

(1) let ans = empty

(2) for i from 1 to n do:

How to prove that

?

Edit: now I can prove it:D give me downvote if you are too stupid to solve this problem:D

• -35

By Tornad0, history, 4 years ago,

#### Announcement

Hi all, this time we don't have editorial for Codeforces Round #364 because the editorial was eaten.

That's all, wish you high rating.

• -6

By Tornad0, history, 4 years ago,

#### Announcement

Hi all, this time we don't have editorial for Codeforces Round #364 because the editorial was eaten.

That's all, wish you high rating.

• -42

By Tornad0, history, 4 years ago,

Hi all,

I have difficulty on a problem on codeforces http://codeforces.com/problemset/problem/691/D

my submission is : http://codeforces.com/contest/691/submission/19308291

I think my idea is right, I used dsu to group several numbers and downsort numbers inside the groups. But I don't know why I am still wrong answer at test21. The idea is simple, but I can't find what's wrong. Anyone please help me, thanks:D

How to find bugs when you think your algorithms and implementation is correct,BTW?

Edit: Bug found:)))

I should calculate p[i]=parent(i) before I use p[i] . I thought it was automatically done by merging, however it is not :DDDD

• -8

By Tornad0, history, 4 years ago,

http://codeforces.com/problemset/problem/698/C

Hi codeforces, though read the tutorial, I still don't understand it. Please anyone explain how to solve it in detail?why we can look backwards? What is the idea?

Btw, what math should I know to understand it?(i can know the dp,bitmask)

Thank you:D

• -5

By Tornad0, history, 4 years ago,

Hi codeforces, I have a great idea:D

when I read others code in codeforces, I always meet some #define term:

#define pb push_back
#define ppb pop_back
#define FOR(i,a,b) for (int _n(b), i(a); i <= _n; i++)
#define FORD(i,a,b) for(int i=(a),_b=(b);i>=_b;i--)
#define all(c) (c).begin(), (c).end()


Can anyone please make a automatic translator to translate the original simplified code into it's full form? So that people who are not familiar with that can read the code more easily :D

• -19

By Tornad0, history, 4 years ago,

Hi, all

I have a problem wich may solved greedily.

Background: Here is a group G of a people, one maybe another's friend. How to select least number of people to be a leader of a subgroup, so that everyone in the group G has a friend as a leader?

Translate: find least number of radial-subgraph of a graph. By radial-subgraph, it means a subgraph which has at least one point which connects all the other point in the subgraph.

Thanks!

• +2

By Tornad0, history, 4 years ago,

Hi, all, I have a great assumption:

the total number of upvotes in codeforces is more than that of the downvotse in codeforce

Thank you:D

• -43

Is it a good idea to use scala as a language to use in codeforces and why?

I find the language has its beauty of simplicity and fun, so I am wondering whether it is good enough for practice on codeforces. Thank you for your opinions!

(Btw, I really look forward anwsers from anyone who use or have treid scala in codeforces.) (Please don't downvote it if you think it is a silly question. I am just beginner of this language. Thanks)

Edit — to those who downvote me: You are just a bit of St, no thanks:)

• -39

By Tornad0, history, 4 years ago,

Hi all,

Is it a good idea to use scala as a language to use in codeforces and why?

I find the language has its beauty of simplicity and fun, so I am wondering whether it is good enough for practice on codeforces. Thank you for your opinions!

(Btw, I really look forward anwsers from anyone who use or have treid scala in codeforces.) (Please don't downvote it if you think it is a silly question. I am just beginner of this language. Thanks)

Edit — to those who downvote me: You are just a bit of S

• -17

By Tornad0, history, 5 years ago,

A problems are simple, and I tried to submit once without testing, but I always failed to accept at once. Sometimes I get stuck in very simple mistakes. I feel that programming is so hard because of those mistakes, so I even don't have confidence to think about harder problems with advanced algorithm. Any advice please? Maybe I should change from C to another language? （But sometimes I really enjoy graspping the idea of hard problems. There are so many difficulties and exceptions for me to communicate with my computer.）