# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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 |
---|