QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#333565 | #8213. Graffiti | danielkou5855 | WA | 0ms | 3556kb | C++17 | 835b | 2024-02-20 08:27:48 | 2024-02-20 08:27:48 |
Judging History
answer
// Source: https://usaco.guide/general/io
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <chrono>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <bitset>
#include <random>
#define int long long
#define sz(x) (int) x.size()
#define all(x) x.begin(), x.end()
using namespace std;
vector<vector<int>> adj;
signed main() {
cin.tie(0) -> sync_with_stdio(false);
int N; string W;
cin >> N >> W;
adj.resize(N);
for (int i = 0; i < N - 1; i++) {
int a, b; cin >> a >> b; a--; b--;
adj[a].push_back(b); adj[b].push_back(a);
}
if (W.length() == 1) {
cout << N << "\n";
return 0;
} else if (W.length() == 2) {
cout << 2 * (N - 1) << "\n";
return 0;
}
cout << "fuck\n";
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3536kb
input:
1 a
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3556kb
input:
3 orz 1 2 2 3
output:
fuck
result:
wrong output format Expected integer, but "fuck" found