PCTprobability orz
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | Um_nik | 163 |
2 | cry | 161 |
3 | maomao90 | 160 |
4 | -is-this-fft- | 159 |
5 | awoo | 158 |
6 | atcoder_official | 157 |
7 | adamant | 155 |
7 | nor | 155 |
9 | maroonrk | 152 |
10 | Dominater069 | 148 |
This user is spamming his blogs in the feed.
Look there are tons of senseless blogs by him.
I request admins and MikeMirzayanov to disable/ban this user for all our mental peace.
Thanks
They submit the leaked code first to check if it is correct, then resubmit it after changing var names, etc to avoid plagiarism.
I went through each skipped D submission and manually caught these.
Their submissions speak for themselves, I don't need to explain anything. (Just check their skipped submission of D, it is 100% same as the leaked D code I shared in my previous blog)
I request Mike to ban them all.
Thanks
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int w[N];
vector<int> edges[N];
bool visited[N];
int cnt = 0;
int f[N];
void dfs(int u) {
int c = 0;
visited[u] = true;
for(int v : edges[u]) {
if(visited[v]) continue;
++c; dfs(v);
}
if(!c) ++f[w[u]];
else if(u != 1 && w[u] == 2) ++cnt;
}
void solve() {
int n; cin >> n;
cnt = 0;
for(int i = 1; i <= n; i++) edges[i].clear(), visited[i] = false;
for(int i = 1; i < n; i++) {
int u, v; cin >> u >> v;
edges[u].push_back(v);
edges[v].push_back(u);
}
string s; cin >> s;
for(int i = 0; i < n; i++) {
if(s[i] == '?') w[i + 1] = 2;
else w[i + 1] = s[i] - '0';
}
f[0] = f[1] = f[2] = 0;
dfs(1);
int ans = 0;
if(w[1] == 0) ans = f[1] + (f[2] + 1) / 2;
if(w[1] == 1) ans = f[0] + (f[2] + 1) / 2;
if(w[1] == 2 && f[0] == f[1]) ans = f[1] + (f[2] + (cnt % 2)) / 2;
if(w[1] == 2 && f[0] != f[1]) ans = max(f[0], f[1]) + f[2] / 2;
cout << ans << '\n';
}
int main() {
int t; cin >> t;
while(t--) {
solve();
}
}
#include<bits/stdc++.h>
using namespace std;
int w[100010];
void solve() {
int n, a, b; cin >> n >> a >> b;
int c = __gcd(a, b);
for(int i = 1; i <= n; i++) {
cin >> w[i];
w[i] %= c;
}
sort(w + 1, w + 1 + n);
int ans = w[n] - w[1];
for(int i = 1; i < n; i++) {
ans = min(ans, w[i] + c - w[i + 1]);
}
cout << ans << '\n';
}
int main() {
int t; cin >> t;
while(t--) {
solve();
}
selmon__bhoi check his submissions (has cheated 5 times already)
AbhiKundu2002 Pro cheater, check his submissions, you will find nonsensical similarities.
(has cheated 3 times)
MikeMirzayanov Please ban these cheaters asap.
I saw many people in the telegram group that I have joined sharing solution for D1 (~30% AC), D2 (~60% AC), E(~15% AC).
Not to mention the cheating for ABCs is also prominent.
Its sad to see so many cheaters doing their thing to cheat. Its insane.
I want to know the experience of other people like how difficult do you think D1,D2,E was ?
(personally i was only able to do till D2, and i think d1 was pretty ez as a D, D2 was kinda good as a D, I don’t know about E)
You are given an integer N and a prime P. Count the number, modulo P, of undirected connected graphs G of N vertices numbered 1 to N that satisfy the following conditions:
There are no self-loops in G. Note that multiple edges are allowed.
For all edges (u,v) in G, if we delete (u,v) from G, G remains connected. In other words, G is edge-biconnected.
For all edges (u,v) in G, if we delete (u,v) from G, G is no longer edge-biconnected. Two graphs are considered different if and only if there exists a pair of distinct vertices (u,v) such that the numbers of edges connecting u and v in the two graphs are different.
N<=50, P<=1e9
Input : Two integers N and P
Output: Print the answer.
Problem A :
1,2,3,4,.......n is an intutive and easy answer.
Difficulty: 5/10 for a A
Problem B
Search the whole matrix a on 2x2 small grids and keep changing the values accordingly till i=0,n-1. j=0,m-1. In the end you will check if the two matrices are now equal or not.
Difficulty: 9/10 for a B
Problem C
There are nine cases totally ABC, ACB, BAC, BCA, CAB, CBA now check for each case seprately and apply binary search to find the lower bound for total_sum/3. Implementation is kinda tough.
Difficulty: 8/10 for a C
Problem D
Just count number of inversions using merge sort/segment tree. If (count1-count2)%2==0 YES else NO. Corner case: check if a & b are a permutation of each other or not.
Difficulty: 5/10 for a D
Name |
---|