exec_outcome stringclasses 1
value | code_uid stringlengths 32 32 | file_name stringclasses 111
values | prob_desc_created_at stringlengths 10 10 | prob_desc_description stringlengths 63 3.8k | prob_desc_memory_limit stringclasses 18
values | source_code stringlengths 117 65.5k | lang_cluster stringclasses 1
value | prob_desc_sample_inputs stringlengths 2 802 | prob_desc_time_limit stringclasses 27
values | prob_desc_sample_outputs stringlengths 2 796 | prob_desc_notes stringlengths 4 3k ⌀ | lang stringclasses 5
values | prob_desc_input_from stringclasses 3
values | tags listlengths 0 11 | src_uid stringlengths 32 32 | prob_desc_input_spec stringlengths 28 2.37k ⌀ | difficulty int64 -1 3.5k ⌀ | prob_desc_output_spec stringlengths 17 1.47k ⌀ | prob_desc_output_to stringclasses 3
values | hidden_unit_tests stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PASSED | 2fd49b30a14ae783110b057bd210b28b | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedInputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class C {
public static int[] solve(String[][] players) {
int[] res = new int[3];
Map<String, Integer> hash = new HashMap<>();
for (String[] ws: players) {
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 147f118dc5dccfd9d424c41867ac0d22 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class WordGame {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int T = input.nextInt();
HashMap<String, int[]> freq = new HashMap<>();
int[] points;
while (T-- > 0) {
points = new int[3];
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6bf3a1212081b9314bc5114b8baebb55 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String []args) {
Scanner in = new Scanner(System.in);
int t = 1;
t = in.nextInt();
while (t-->0)
{
int n=in.nextInt();
HashMap<String,Integer> mp=new HashMap<String,Integer>();
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 7555597ee861c1ed180da71eb4122105 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class ProblemC {
static HashMap<String,Integer> addToMap(HashMap<String,Integer> map,String word){
if(map.containsKey(word)){
int temp = map.get(word);
map.put(word,++temp);
}
else{
map.put(word,1);
}
re... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 8f6ce3566c20fd14b6eaaf9015401719 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import static java.util.Map.entry;
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;
import java.math.*;
public class Solution {
private static final Map<Integer, Integer> NO_FO_WORDS = Map.ofEntries(entry(1, 3), entry(2, 1), entry(3, 0));
public static void main(String[] ... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 36044aa51b93b413f61ab2f2621f35ba | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class Main817C {
public static void main(String[] args) throws IOException {
BufferedReader input = new BufferedReader(new In... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 706d7ea2275a8f6efb4a7a4cf8321237 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.util.*;
public class _1722C_WordGame {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int t = input.nextInt();
while (t-- > 0) {
solve(input);
}
}
static void solve(Scanner input) {
int len = input.nextInt(... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | bc028e97f6d7066ee0b92244c13cec9d | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class ProblemC {
private static final Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
solve();
}
}
private static void solve() {
int ... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 7cac72bfaf0480c7e9de9349d6025200 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.Flushable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class Sub... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | b4c7c8c54354f46514ec654c1fb46e3a | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main
{
public static void main(String[]args)
{
Scanner S = new Scanner(System.in);
int T = S.nextInt();
while(T-- > 0)
{
HashMap<String,Integer>Mp = new HashMap<String,Integer>();
ArrayList<ArrayList<Strin... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 44ba904422874da3a176da4af3134b21 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main{
static Scanner s = new Scanner(System.in);
public static void main(String[] args) {
int t = s.nextInt();
while(t-->0){
HashMap<String,Integer> mp = new HashMap<>();
int n = s.nextInt();
String ar[][] = new String... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 02813cf1926e9fe068a94682cf375152 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.lang.System.*;
public class Main implements Runnable {
private final void process() throws IOException {
// InputReader input = new InputReader(new FileReader(System.getenv("INPUT")));
// PrintWriter ou... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 299c68f3395df48914a4a0092e626f94 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
public class MyClass {
static Scanner in = new Scanner(System.in);
public static void printArray(int[] arr) {
for(int i=0; i<arr.length;... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 9a5b7f402ebf38e30548e20316adb1ce | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class guess {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
String [] s = new Str... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 18a78cb45ec93324959fe2cc23436edd | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
public class WordGame {
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int cases = sc.nextInt();
for(int i = 0 ; i<cases;i++){
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 86da10926290146fb2b3a581fa294513 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class BrInput {
public static class Pair {
int x;
int y;
public Pair(int x, int y) {
this.x = x;
this.y = y;
}
}
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | ea47fd0c04ca0032a3c042aae2a7fe56 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;;
public class Solution {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int t = sc.nextInt();
Outer: while (t-- > 0) {
int n = sc.nextInt();
int one = n*3, two = n*3, three =... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 4463a9398f1b697b8455a13b782cbbd4 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashMap;
import java.util.Scanner;
public class wordGame {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
HashMap<String,Integer> hm=new HashMap<>()... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 92fb95ef46f068c990c31c0369cd7aea | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Codeforces {
private static final int INT_MAX = 999999999;
/*public static int power(int x,int n) {
if(n==0)
return 1;
return x*power(x,n-1);
}*/
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int test=... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | f31c6254e34a87d5fd5b687290f84154 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Solve {
private static void solve(Scanner sc) {
int n = sc.nextInt();
HashMap<String, Integer> map = new HashMap<>();
List<String> list = new ArrayList<>();
for (int i = 0; i < 3; i++) {
for (int j = 0; j < n; j++) {
String s = sc.next();
list.add(s);
if (map... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | b6e01129a57192d89265ef4bc56799a9 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.io.*;
public class CF1722C {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter pr = new PrintWriter(new OutputStreamWriter(System.out));
int t = sc.nextInt();
HashMap<String, List<Integer>> mp = new HashMap<>();
while (t-- > 0)... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 1fa8cae46dde18be183d5a0307ce2507 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int t = input.nextInt();
HashMap<String, List<Integer>> map = new HashMap<>();
while (t > 0) {
map.clear();
int n = input.nex... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 33deb857b43282ae3a2af5d86cce3030 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.math.*;
public class C1722 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int l=0;l<t;l++) {
int n = sc.nextInt();
String[][] s = new String[3][n];
for(int i=0;i<3;i++) {
for(int j=0;j<n;j++) {
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 3564b81033d05a0ba7cef3afe4414bff | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.io.*;
import java.lang.*;
public class main{
static Scanner sc = new Scanner(System.in);
static String[][] s = new String[4][1005];
public static void Solve(){
int n = sc.nextInt();
Map<String, Integer> M = new HashMap<String, Integer>();
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 21f15d301c7870e74d6d39b540a70aa2 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
public class C {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int tt = 1;
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | fe3afe7cb7ee22e37052671d8d65bc3f | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Solution {
public static Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
int testCase = scan.nextInt();
for(int i = 0; i < testCase; i++) {
solve();
}
}
public static vo... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | ccd5e8d9e1f898296bb08eae3bb14dc1 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class practice {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
while (t-->0){
int n = in.nextInt();
HashMap<Integer,List<String>> m1 = new HashMap<>();
HashMap<Str... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | d8adcf0d08ca11f07d708fea28b458c7 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
public class Main {
StreamTokenizer in;
BufferedReader inb;
PrintWriter out;
StringTokenizer tok;
Scanner sc;
boolean console = true;
final double eps = 1e-9;
final boolean DEBUG = false;
pu... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6ec019ed54acba79a818d2c2a62fb93d | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.io.*;
public class C_Word_Game {
final int mod = 1000000007;
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null |... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 8768185adf3d1e4f339d2af33d44c8e5 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.io.*;
import java.util.*;
public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static int tcs, n;
static StringTokenizer st;
static Map<String, Integer> map = new HashMap<>();
static int p1, p2, p3;
static String[][] table;
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | ea1853e9333d479bb236c9c21d418943 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tt = 0; tt < t; tt++) {
int n = sc.nextInt();
St... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 42d02f3cec40fa7f82825a72fdd32cfb | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t > 0){
HashMap<String, Integer> map = new HashMap<>();
int n = sc.nextInt();
int p1 = n*3, p2 = n*3, p3... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | af25dcc393687e420dbc03a31501a769 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.util.Map.Entry;
import java.io.*;
import java.lang.*;
public class main1{
FastScanner in;
PrintWriter out;
public static void main(String[] arg) {
new main1().run();
}
//////////////SOLVE QUESTIONS HERE/////////////
public cla... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 1eb42e215bc3c0ed4561f4ba7bf3ba14 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
private final static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int testCases = sc.nextInt();
for (int testCase = 0; testCase < testCases; testCase++) {
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 55453a6d07cea7a0a6e8d6df4ad049e2 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class C_Word_Game {
static Scanner sc = new Scanner(System.in);
static void input(String arr[], Map<String, Integer> mp) {
for (int i = 0; i < arr.length; i++) {
arr[i] = sc.next();
mp.put(arr[i], mp.getOrDefault(arr[i], 0) + 1);
}
}
static int increment(String ... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 262ddd7c20b44682acbf1c15ad0a0283 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
public class C {
final private static FastReader reader = new FastReader();
final private static... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 776f30f3bbbfa0c080c42f5b30646967 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class C_Word_Game {
public static void main(String[] args) throws IOException {
InputStrea... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | c2c7c4b674a607314db89d987b67f004 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class WordGame {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numTestCase = sc.nextInt();
int arr[][] = new int[numTestCase][3];
for (int i = 0; i < num... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | e33a679a988a8f22099c7d64faeb3971 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
private void solve(InputReader in, PrintWriter pw) {
int t = in.nextInt();
outer:while (t-- > 0) {
int n = in.nextInt();
String[][] s = new String[3][n];
HashMap<String, Integer> map = new HashMap... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6f59408a4ffe01b6812d22d86e0b8906 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import static java.util.Map.entry;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;
public class Main {
static final Map<Integer, Integer> COUNT_TO_POINT =
Map.ofEntries(entry(1, 3), entry(2, 1), entry(3, 0));
public stat... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 0ff9120a31d9bc91cb08dffc2e608798 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
public class D {
public static void main(String[] args) {
FastReader scanner = new FastReader();
int numberOfCases = scanner.nextInt();
while (numberOfCases... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 5c69d0293e3c1d9e8ea6eb303dc15df0 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class MainCode {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n-- > 0) {
int k = sc.nextInt();
sc.nextLine();
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6944aad183cb9db06c1ea3c1e906dbd7 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int T=in.nextInt();
while(T-->0)
{
int n=in.nextInt();
HashSet<String> h1=new HashSet<>();
HashSet<String> h2=new HashS... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 00643dc021b4338355c49dfa7eaf6408 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String args[])throws Exception {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
// sc.nextInt();
// sc.Integer.parseInt()nextLine();
int T = Integer.parseInt(input.readLine());
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | cce9a09f41df8e59b0f7f7af7ed83050 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class wordGame {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while(T-->0)
{
int n = sc.nextInt();
String[][] s1 = new String[3][n];
int[] ar = new int[3];
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 11b5f9c633bab8f137b5fca925904457 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | //package codeforces;
import java.util.*;
public class Problem_17 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int test = sc.nextInt();
while (test-- > 0) {
int n = sc.nextInt();
Set<String> set1 = new HashSet<>();
Set<String> set2 = new HashSet<>();
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6eca6aa451db6fff867d65f7a30d066c | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
public static void main(String args[])throws Exception{
// Your code goes here
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
while(t-->0){
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 04fae7b8fc88159ac2e2bf26170f389a | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
pu... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | cca06d6356d4cbbd1650f5ec857bda69 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class B {
static InputReader in;
static OutputWriter out;
public static void main(String[] args) throws FileNotFoundException {
in = new InputReader(System.in);
out = new OutputWriter(System.out);
if (System.getProperty("ONLINE... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 3662f4fb4b48b5dd45fb38376d464865 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class codeforces {
public static String str="Timur";
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int h=0;h<t;h++) {
int n = sc.nextInt();
String a []=new String[n];
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | a488041396d23242c76c937b26248d08 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class solution{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int m = 1; m <= n; m++){
int l = sc.nextInt();
int[] ans = new int[3];
String ar1[] = new String[l];
HashMap<String,String> map1 = new HashMap<>(... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6f960804c714ed2af68e08a1033dfc09 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class problemC {
public static void main(String[] args) {
Scanner sh = new Scanner(System.in);
int t = sh.nextInt();
while(t>0){
int n = sh.nextInt();
sh.n... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | c7f20d13b344cb815a5b3314cf8aabbf | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t= sc.nextInt();
while(t>0){
int n= sc.nextInt();
int p=0,q=0,r=0;
String l[] = new String[3*n];
Map<St... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 7d631eb42fa55fa6dcf84e8c413befc9 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
public class Codeforces2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int tc = sc.nextInt();
while (tc-- > 0) {
int n = sc.nextInt();
ArrayLis... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | a460e599c3e43b78e3b1c5e2d7cb6e29 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.util.Map.Entry;
import java.io.*;
import java.lang.*;
public class main1{
FastScanner in;
PrintWriter out;
public static void main(String[] arg) {
new main1().run();
}
//////////////SOLVE QUESTIONS HERE/////////////
public class ... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 3a5340ba58481e1ca9a442c53a647ffa | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashSet;
import java.util.Scanner;
public class C {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int it = 0 ; it < t ; it++){
int n = sc.nextInt();
HashSet<String> aSet = new HashSet... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 35c0645ae6cbd94d2ec3a82ec1dadba8 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
P... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6e533f43c893e52f9d114128e7adda5b | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class c {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int t = input.nextInt();
while(t-- > 0) {
int n = input.nextInt();
String[][] arr = new String[3][n];
HashSet<String>[] set = new Hash... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 2462cb3d9ac394ff766fe197c7992e00 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashSet;
import java.util.Scanner;
public class ProblemC {
public static void main(String[] args) {
var scanner = new Scanner(System.in);
var cases = scanner.nextInt();
for (int tc = 0; tc < cases; tc++) {
var words = new HashSet<>();
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 02050c303337325e5be5af647f39d4cf | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
//package Codeforces;
import java.util.HashSet;
import java.util.Scanner;
/**
*
* @author Vinay Jain
*/
public class... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 217089bbf8b131254cd0227520df5431 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Sol
{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
int t=s.nextInt();
for(int i=0;i<t;i++)
{
int n=s.nextInt();
String na[][]=new String[3][n];
for(int j=0;j<3;j+... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 17 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | a72c7f500eaa4addc1f1de1c71289b46 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class WordGame {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int T = input.nextInt();
HashMap<String, int[]> freq = new HashMap<>();
int[] points;
while (T-- > 0) {
points = new int[3];
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | b9afb85ebf285b4a7b85898bc7ed4ccb | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.Scanner;
import java.util.HashSet;
import java.util.Set;
public class Word_Game {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
while (t-- > 0) {
int n = scan.nextInt();
Set<St... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 90bf33dc4596051738d618ae9fa1dd80 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.HashSet;
import java.util.TreeMap;
import java.util.PriorityQueue;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws IOE... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | e921a7d2d4c992742345630646d553bf | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class Words {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
int numberOfSets = Integer.parseInt(br.readLine());
for (int nos = 0; nos < numberOfSets; nos ++) {
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 6f5bdd96954818971c6380e44cdfccf7 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class WordGame {
public static void main(String[] args) {
final Scanner sc = new Scanner(System.in);
int t = Integer.parseInt(sc.nextLine());
String[] resultados =new String[t];
for(int i=0;i<t;i++){
int n=Integer.parseInt(sc.nextLine... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 91c761271709f0e1ebf82474da1eee44 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class C817 {
static AReader scan = new AReader();
static void solv... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | c982e4a387739519284c716a55f90b79 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class _1722C {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i=1;i<=t;i++) {
in... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 9605130d71952fcfa2d6fde9490c5aa6 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.BigInteger;
import java.util.stream.Collectors;
public class Main {
InputStream is;
PrintWriter out;
String INPUT = "";
void run() throws Exception {
is = System.in; out = new PrintWriter(System.out);
solve(); ou... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 4d66fab65d5a00da53d03f2f5a5d4217 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int t=s.nextInt();
while(t-->0)
{
int n=s.nextInt();
String[] q1=new String[n];
String[] q2=new String[n];
String[] q3=new String[n];
HashSet<String> l1=n... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | b77400c1e4aa802bdac1cc9f1b76c99e | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.util.regex.Pattern;
public class Robot4 {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
int s = x.nextInt();
for (int i = 0; i < s; i++) {
int count1=0;
int count2=0;
int count3=0;... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 21c7a4fc1c6baf01a032f5279ee85784 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Codeforces {
public static void main(String[] args) {
try {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-->0) {
int n = sc.nextInt();
String[] a = new String[n];
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 44e4568a4c20ff87d8e69f822fe22442 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.StringTokenizer;
public class ProblemA {
public static void main(String[] args) throws IOException
{
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
Str... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 9b6cb3e9f1b594f1a712161ce0c2e9a7 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class OurThirdProblem {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
for (int t = in.nextInt(); t>0; t--){
int n = in.nextInt();
HashMap<String, LinkedList<Integer>> map = new HashMap<>();
for (i... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 9ba4ecb3d5baa937774bd8ae10d8db96 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class _1722C {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
for (int t = in.nextInt(); t>0; t--){
int n = in.nextInt();
HashSet<String> M1 = add(in, n), M2 = a... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | f9c014a9a7f2d7ccc38b9f0cac8a3af2 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class _1722C {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
for (int t = in.nextInt(); t>0; t--){
int n = in.nextInt();
HashSet<String> M1 = add(in, n);
HashSet<String> M2 = add(in, n);
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 3a5ee0ebfdc39e285f7766961c55d238 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0){
int n= sc.nextInt();
HashMap<String,Integer>hm = new HashMap<>();
String a[][] = new String[3][n];
int i,j = 0;
for(i=0;i<3;... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | b87e780aa5d5f3ecbc9fb19a224dde2c | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int T = scn.nextInt();
while(T-->0){
int n = scn.nextInt();
String[][] arr = new String[3][n];
HashMap<String,Integer> map = new... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | a8163caa8916b24751974755065072bc | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashSet;
import java.util.Scanner;
public class WordGameSet {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
for ( int p = 0; p < t; p++){
int n = in.nextInt();
HashSet <String> set1 = new... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 3d88a09a779d6bea707f3c329e48a358 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.Scanner;
import java.util.*;
public class Q3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner key=new Scanner(System.in);
int t=key.nextInt();
for(int i=0;i<t;i++) {
int n=key.nextInt();
key.nextLine();
String str1=key.nextLine();
String str2=key... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 8af19132adf7b67a4abac370d2e51c77 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String []args) {
Scanner scan = new Scanner(System.in);
int testCases = scan.nextInt();
for(int q = 0; q < testCases; q++) {
int n = scan.nextInt();
String [][] input = new String[3][n];
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | c19535144ac1569cc0708ce8fe01fccf | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.rmi.Remote;
import java.text.Collator;
// import java.util.Scanner;
import java.util.*;
import javax.management.Query;
import javax.xml.transf... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 3e68709347b8b92adb84859f2792f3a0 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Solution {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
HashMap<String, Integer> map = new HashMap<>();
int n = sc.nextInt();
sc.nextLine(... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | b6c1e3b63448cfc9179231da2fa75fbd | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Solve {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int count = Integer.parseInt(sc.nextLine());
for(int i = 0; i < count; i++){
System.out.println(... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 14f607d95c5b328e1ffa12ac5a18f596 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.Scanner;
import java.util.*;
public class distict {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t>0) {
int n=sc.nextInt();
HashSet<String> valid1 =new HashSet<>();
HashSet<String> va... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 8824d93b8b7deb5ede706472088acd76 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.util.Map;
/**
*
* @author Vattikuti Rajesh
*/
public class SolutionA {
public static void main(String r[]){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
S... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 00a046fed502c4d14d23a104b17f7958 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class ProbC_2 {
public static void main(String[] args) {
FastScanner fs = new FastScanner(System.in);
int t = fs.nextInt();
while(t-- > 0){
int n = fs.nextInt();
String[][] arr = new String[3][n];
for... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | dd050caef3354f11cd412c5d067912f9 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class C_Word_Game {
public static void main(String args[]) throws IOException {
Scanner sc = new Scanner(System.in);
int ... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 01534d6725fa1cfd99d8517959eaa250 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
import ja... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 12e839f17dbfe1e81ecbb8c672d86c60 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class Rough {
static ArrayList<Long> ar=new ArrayList<>();
static long an=998244353;
//static long an2=(long)1E18;
public static void main(String[] args) throws Exception {
Scanner s = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 782e2c614fbf672129078e70b5dd731b | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class C_Word_Game {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int testCase=input.nextInt();
for(int i=0;i<testCase;i++){
int wordsNumber=input.nextInt();
Set<String> player1=new HashSet();
... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 28583809e736a025dbca898aab094955 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class threeQ {
static class Pair{
int index;
int count;
Pair(int index, int count){
this.index=index;
this.count=count;
}
}
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 7db3a489a87d37f01bc3827d884c9a59 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.*;
public class Main
{
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br =... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | cba79b71e2252ed6fabcebeead82022c | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++)
{
int n=sc.nextInt();
HashMap<String,ArrayList<Integer>> hm=new HashMap<>();
String arr[][]=new String[3][n];
for(int j=0;j<... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 0b0b689548cb090e48ea0d115c9a4e68 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.io.*;
import java.sql.SQLOutput;
import java.util.*;
public class Algorithms {
static FastScanner scan = new FastScanner();
static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
int t = scan.nextInt();
for (int i = 1; i <= t; i++) {... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 1c798a69be09205bf9e24d32a5eb8010 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
static Reader r = new Reader();
static StringBuilder sb = new StringBuilder();
public static void main(String args[]) throws IOException {
int t = r.readInt();
while(t-->0){
solve();
}
System.... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 2fbe5ea00d5f12cc9be0883d48d65512 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes |
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
Scanner sc=new Sca... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 218a2e5773060a2a0541fcea1732b812 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.*;
import java.util.*;
public class R817C {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
while(t-->0){
int n = scan.nextInt();
scan.nextLine();
HashMap<String, Integer> ma... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | d7e1912a68eb37fbbddd3b2ef3f39548 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.util.*;
public class Main
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int t = in.nextInt();
for(int p=1;p<=t;p++)
{
int n = in.nextInt();
String s[][] = new String[3][n];
for(int i=0;i<... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output | |
PASSED | 15d7877467aaf1c34d7c6136381142a3 | train_109.jsonl | 1661871000 | Three guys play a game: first, each person writes down $$$n$$$ distinct words of length $$$3$$$. Then, they total up the number of points as follows: if a word was written by one person — that person gets 3 points, if a word was written by two people — each of the two gets 1 point, if a word was written by all — no... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.StringTokenizer;
// https://codeforces.com/contest/1722/problem/C
public class CF1722C {
static class FastReader {
BufferedReader br;
StringTokenizer s... | Java | ["3\n\n1\n\nabc\n\ndef\n\nabc\n\n3\n\norz for qaq\n\nqaq orz for\n\ncod for ces\n\n5\n\niat roc hem ica lly\n\nbac ter iol ogi sts\n\nbac roc lly iol iat"] | 1 second | ["1 3 1 \n2 2 6 \n9 11 5"] | NoteIn the first test case: The word $$$\texttt{abc}$$$ was written by the first and third guys — they each get $$$1$$$ point. The word $$$\texttt{def}$$$ was written by the second guy only — he gets $$$3$$$ points. | Java 11 | standard input | [
"data structures",
"implementation"
] | f8a89510fefbbc8e5698efe8a0c30927 | The input consists of multiple test cases. The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \leq n \leq 1000$$$) — the number of words written by each person. The... | 800 | For each test case, output three space-separated integers — the number of points each of the three guys earned. You should output the answers in the same order as the input; the $$$i$$$-th integer should be the number of points earned by the $$$i$$$-th guy. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.