QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#333564 | #8213. Graffiti | danielkou5855 | RE | 0ms | 3552kb | C++17 | 806b | 2024-02-20 08:27:04 | 2024-02-20 08:27:05 |
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;
for (int i = 0; i < N - 1; i++) {
int a, b; cin >> 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: 3552kb
input:
1 a
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: -100
Runtime Error
input:
3 orz 1 2 2 3