# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
I tried this sum and implemented a O(n2) solution, which should pass given n < 2000 , but it doesnt.. any explanations why ?
Hello all, please see testcase 11 of this submission.. its behaving really weird
Hello I am solving this problem . I am confused on how to fill up the graph so that I can implement shortest path using bfs.
Hello all, recently I gave my C++ exam, I came across this question. I was unable to understand the logic.
Can anyone explain what happens inside foo() ?
Thanks for your help :)
#include <iostream>
using namespace std;
void foo(char **p);
int main()
{
char *argv[] = {"ab","cd","ef","gh","ij","kl"};
foo(argv);
return 0;
}
void foo(char **p)
{
char *t = (p += sizeof(int))[-1];
cout << t << '\n';
}
In the recent codechef contest, I solved the sum DIVGOLD using lists in Python.
Here is the code
for i in xrange(0,n):
foo=list(s)
k=foo.pop(i)
for j in xrange(0,n):
foo.insert(j,k)
minm=''.join(foo)
ans=min(minm,ans)
foo.pop(j)
I am unable to implement it using list
in STL. Erasing the element and inserting elements doesnt seem to work. Any solutions ?
Edit: Seems that there was a fault in my looping logic. Implementation using strings seems to be a much better option.
string s,ans,res;
cin >> n;
cin >> s;
ans = s;
for(i = 0; i < n; i++)
{
ch = s[i];
s.erase(s.begin()+i,s.begin()+i+1);
for(j = 0; j < n; j++)
{
s.insert(j,1,ch);
ans = min(ans,s);
s.erase(s.begin()+j,s.begin()+j+1);
}
s.insert(i,1,ch);
}
cout << ans << endl;
The trend of people spamming useless comments like "give minus" has been around for quite a while. In recent times however it has seen an inflation to such a extent that it has become a real nuisance. What's worse is that now there have been increasing cases of spamming in blogs as well. If left unchecked , I fear that they might grow into a serious issues someday in the future.
My solution to the problem is to follow the following steps:
People with a history of spamming comments should be banned from posting blogs or commenting. Alternatively people with a certain contribution (say -30 or less) shouldn't be allowed to comment or post blogs.
Unrated people shouldn't be allowed to comment or post a blog. A person has to attended a minimum of 4-5 contests to be eligible for commenting or posting a blog. This will ensure that people don't open fake accounts just for spamming. Also I think most people with less than 4 contests don't generally comment or post blogs.
Suggestions are welcome.
Name |
---|