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 | 1aaa55b08b81c1856f89988f9730fcca | 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 IOException {
Reader s = new Reader();
Scanner sc = new Scanner(System.in);
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer 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 | 3620b2b8c9e302954c1c1ec80ba5134f | 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 IOException {
Reader s = new Reader();
Scanner sc = new Scanner(System.in);
try {
int t = sc.nextInt();
// BufferedReader bu = new BufferedReader(new 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 | 91546d2603e7d4bacdcb485448ebaf22 | 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.InputStreamReader;
import java.util.*;
public class WordGame3_1 {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(reader.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 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 | d0e858daef685e54256d8bb2ec666eb5 | 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 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
while (t-- > 0) {
int size = scan.nextInt();
Set<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 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 | 7427a54b4a70ad5776c0da54fbce6977 | 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 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
in.nextLine();
while(N-->0) {
int words = in.nextInt();
in.nextLine();
Set<String> aSet = 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 | 36025fe1b37a3ba848d146fd8989259e | 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 int T;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
StringTokenizer st = new StringTokenizer(... | 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 | 2266cbcdf712b23e8e84819ab314c4b0 | 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.List;
import java.util.Scanner;
public class WordGame {
public static void main(String[] args) {
int testCases;
Scanner s = new Scanner(System.in);
int numberWords;
testCases = s.nextInt();
f... | 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 | 68352742f776feabe06524901609b176 | 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 test = sc.nextInt();
while(test-->0){
int res[] = new int[3];
int n = sc.nextInt();
String s[][] = 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 | de15b1624f448a92e725c89b3dd1b0e3 | 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.*;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.*;
public class Yoo
{
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new Buffe... | 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 | 437bf5c283eaf61155ebfd21810a9a20 | 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 Algorithm;
import java.awt.List;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Col... | 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 | 1e7fd7823eefa88fb6b6af98faa4ff6a | 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 Solve {
static final int MOD = 1000000007;
static int count = 0;
public static void main(String[] args) {
Reader in = new Reader();
PrintWriter out = new PrintWriter(System.out);
int t = in.readInt();
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 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 | 82d22ee8201d2428d04ce3025b34089e | 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.IOException;
import java.util.HashMap;
import java.util.Scanner;
public class test{
public static void main(String[] args) throws IOException {
Scanner sc=new Scanner(System.in);
int count=Integer.parseInt(sc.nextLine());
String[] arr=new String[3];
for(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 | 17d48c6716d4e87aa0fcaf39b82cff0c | 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.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;
public class App
{
public static void main(String[] args) throws Exception
{
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.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 | 490a044a97d77698462e5c30bc63a507 | 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 | 096f2e9766b3d8d6366f93fc293dfc17 | 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.File;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
public class App {
public static void main(String[] args) t... | 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 | 3d16f7df623500bc687517dd27d50765 | 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 Word {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
Set<String> s1 = new HashSet<>();
Set<String> s2 = 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 | 4e2ec282c69fd71d7d1d4ac08002511a | 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 com.company;
import com.sun.source.tree.Tree;
import java.io.*;
import java.util.*;
public class Q1 {
public static void main(String[] args) throws Exception{
Reader1.init(System.in);
BufferedWriter output = new BufferedWriter(new OutputStreamWriter(System.out));
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 | ceee1065ee20455152deb0cf47c31de6 | 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 MyOwn {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer st;
public static int[] arr = new int[5];
public static String s, s1;
public static void main(String args[]) throws IOException{
int t =... | 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 | 76e574c20c782b7ea99a6aec4225f530 | 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 IO{
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
br=new BufferedReader(new InputStreamReader(System.in));
}
String next(){
while(st==null || !st.hasM... | 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 | 8fbd89facf9061caa7b6426dcdd2108d | 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 | // JAI SHREE RAM, HAR HAR MAHADEV, HARE KRISHNA
import java.util.*;
import java.util.Map.Entry;
import java.util.stream.*;
import java.lang.*;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.io.*;
public class CodeForces {
static private final String INPUT = "input.txt";
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 | c446c1c655adb366dbc0bd43359a299f | 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class CodeForces {
static HashMap<String,Integer> m = new HashMap<>();
static void pushIntoMap(String s[]) {
for (int i = 0; i < s.length; i++) {
if (m.containsKey(s[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 | d29716b8480aa973e8b5ceb8fa0d1405 | 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.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;
public class CF1722C {
public static void main(String[] args) throws IOException {
InputReader in = new InputReader();
... | 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 | d6b31f6bbf3b3444364620fa8c34a8f4 | 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 t = scan.nextInt();
Map<String, Integer> a = new HashMap<>();
Map<String, Integer> b = new HashMap<>();
Map<String, Integer> c = new HashMa... | 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 | 9a18b634de34ac836717a0f78343ec9f | 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 SpellCheck
{
public static void main(String[] args) throws IOException
{
//Scanner sc= new Scanner(System.in);
BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
int t=Integer.parseInt(sc.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 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 | 4b26efb5e490388f8d6e4bed871d448e | 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.*;
public class Solution {
static class RealScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = 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 | 0936e444833e75eadb62f92619227385 | 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.InputStreamReader;
import java.security.spec.ECField;
import java.util.HashMap;
import java.util.Scanner;
public class hello {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
try {
int T = scn... | 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 | 52dd6455814edc3ff7c7b89b9c93fa5e | 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)
{
Scanner in = new Scanner (System.in);
int t = in.nextInt ();
while (t-- > 0)
{
int n = in.nextInt ();
HashMap < String, Integer > map = new HashMap <> ();
String[] s1 = new 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 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 | 2a6849c8d5c440a422e5b2a84ed86447 | 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 Sample {
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> q = new HashSet<>();
HashSet<String> r = new HashSet<>();
HashSet<String> s = 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 | e8a013aa8636ca6064873f8e193c8f4f | 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 practice1{
public static void main(String[] args) throws IOException, InterruptedException {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = sc.nextInt();
while (t-->0)
{
int 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 | a25ec09cf9b53f7a6b141d775e4aa1a8 | 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 practice1{
public static void main(String[] args) throws IOException, InterruptedException {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = sc.nextInt();
while (t-->0)
{
int 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 | 20e053da358f92adfa1180e91fd6f245 | 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.StringTokenizer;
import java.util.*;
import java.io.*;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import static java.lang.System.out;
import java.math.*;
public class Word_Game_CF
{
static class FastReader{
... | 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 | 398da9bc28618fec00ddcfc3cf39a355 | 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.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
public class C {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
int n,k = 0;
String dump, str;
List<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 | 5ff979e22d077db3c57c12d9ed54fe33 | 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.HashMap;
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 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 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 | bcdc10d553bd3838c1119f54cb8db484 | 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 {
static FastReader sc = new FastReader();
static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) {
int T = sc.nextInt();
while (T-- > 0) {
solve();
}
out.c... | 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 | c259fe58c8108b3f115a78fe1b6060a3 | 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 x=0;x<t;x++){
int n=sc.nextInt();
String [][]s=new String[3][n];
HashMap<String,Integer>h=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 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 | 9ca41854881a81232e79fa176926d88d | 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 int value(Set<String>s,HashMap<String,Integer>map,int one){
for(String p:s){
if(map.get(p)==1) one+=3;
else if(map.get(p)==2) one+=1;
}
return one;
}
public static void main(String[] args) {
... | 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 | b4ff327bb4246f7fc1d744d3714f2c79 | 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 sc = new Scanner(System.in);
int t = Integer.parseInt(sc.next().trim());
String sol = "";
for (int i = 0; i<t; ++i)
{
sol = "";
int n = Integer.parseInt(sc.next()... | 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 | d447f4bd46b25a43d76163a0d1040b0d | 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 in = new Scanner(System.in);
int N = in.nextInt();
while(N-- != 0) {
Map<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 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 | ea65adfa7e495d5d676332df0cfd7e30 | 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.StringTokenizer;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO Auto-generated method stub
Buffered... | 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 | 2b26c2f30fe7ed43cda3ef20ceb6ac0b | 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 {
static class Scan {
private byte[] buf=new byte[1024];
private int index;
private InputStream in;
private int total;
public Scan()
{
in=System.in;
}
public int scan()throws ... | 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 | 25fdaaf5dfb6afcca9fc0eb4f919c6c3 | 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 {
static Scanner sc = new Scanner(System.in);
static class word{
String data;
Boolean a = false;
Boolean b = false;
Boolean c = false;
}
public static void main(String[] args) {
int t = sc.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 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 | 956bdf37c683ea11278baabe6c5350e5 | 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.*;
import java.math.*;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
public class x {
static FastInput scn;
static PrintWriter out;
final static int MOD = (int) (1e9 + 7);
final 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 | 6b14ac9dd98698d8c10e7dea199a1d99 | 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.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
public class fire extends PrintWriter {
fire() { super(System.out); }
public static void main(String[] $) throws IOException {
fire o = new fi... | 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 | 541ffe75b49cf2d0c772e70d9a350214 | 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 sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- != 0) {
int n = sc.nextInt();
String arr1[] = new String[n];
String arr2[] = 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 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 | 072b33f3da02470a278ee36f99d08dd7 | 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 com.company.Array;
import java.util.*;
import java.lang.*;
import java.io.*;
public class Codechef
{
// static Scanner sc = new Scanner(System.in);
static FastReader in =new FastReader();
static final Random random=new Random();
static long mod=1000000007L;
static HashMap<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 | 35d863195aff18ebf725f05b9e29ce5c | 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();
int s1=0;
int s2=0;
int s3=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 | ab1ee78960a284f0ace5d8c6621aac96 | 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 CC {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = sc.nextInt();
for (int i = 1; i <= t; i++) {
int n = sc.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 | 4d900792f17cb4ea7e11bf608afd5f43 | 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 com.sun.security.jgss.GSSUtil;
import java.awt.*;
import java.io.*;
import java.util.*;
import java.util.List;
public class MainClass {
static FastScanner fs;
static FastWriter fw;
static boolean checkOnlineJudge = System.getProperty("ONLINE_JUDGE") == null;
private static final ... | 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 | a75b2ac8104bf7168469d05b2b184a15 | 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.StringTokenizer;
public class Main {
static long ans = 0;
public static void main(String[] args) throws IOException{
// TODO Auto-generated method stub
BufferedReade... | 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 | 71a2f01eee72cb3f5197f6e030f94316 | 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.PrintStream;
import java.math.BigInteger;
import java.util.*;
import java.io.UncheckedIOException;
import java.io.Closeable;
import java.io.Writer;
import java.io.OutputStreamWriter;
/*
@author : sanskarXr... | 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 | 18ee5dfa42e2faa7ac82af873f453cb9 | 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 codeChef; // don't place package name! */
// algo_messiah23 , NIT RKL ...
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
import static java.lang.System.*;
import java.util.stream.IntStream;
import java.util.Map.Entry;
/* Name of the class has to be "Main" only if t... | 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 | 1510fad67b48db4a4ea0e84eb801219b | 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.io.*;
public class Main
{
static long mod = (int)1e9+7;
static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
public static void main (String[] args) throws java.lang.Exception
{
FastReader sc =new FastReader();
... | 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 | 0dc6b3e93c5e184c474d0a310dcfcc12 | 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 pb3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-->0){
int n = sc.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 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 | fcef4e25c31213312d91beaca764177d | 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 codechef; // don't place package name! */
import java.math.*;
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public final class Main
{
FastReader s;
public static void main (String[] args) throws java.... | 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 | 5e6f8e569b47085b4aa40a4e8e509ac9 | 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.lang.reflect.Array;
import java.util.*;
import static java.lang.Math.min;
public class Main {
public static void main(String[] args) {
Reader reader = new Reader();
PrintWriter out = new PrintWriter(System.out);
int T = reader.nextInt();
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 | bcf72f194f38d74b88e6f09da72e1b4e | 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 | /*
"Everything in the universe is balanced. Every disappointment
you face in life will be balanced by something good for you!
Keep going, never give up."
Just have Patience + 1...
*/
import java.util.*;
import java.lang... | 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 | 0ec1951beb70c322caed674726f2dea5 | 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.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.StringTokenizer;
public class cf1722C {
public static void main(String[] args) {
FastR... | 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 | e5f68ec55836fcd8bf0c1201d4c3cba2 | 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 | // "static void main" must be defined in a public class.
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int shh = scn.nextInt();
for(int h = 0 ; h < shh ; h++){
int n = scn.nextInt();
scn.... | 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 | bb1f65220b91230dd9be2e1030986c0b | 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 | // "static void main" must be defined in a public class.
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int shh = scn.nextInt();
for(int h = 0 ; h < shh ; h++){
int n = scn.nextInt();
scn.... | 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 | baadba236c82cf73af4a7b1a375b6ef3 | 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 z = 0; z < t; z++) {
int n = in.nextInt();
HashMap<String, Integer> first = new HashMap<>();
HashMap<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 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 | 0b461530063f1353cd731090673a5563 | 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.Scanner;
public class WordGame {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t= in.nextInt();
for(int T=1; T<=t; T++)
{
int n = in.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 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 | 490c31795e753ae89903da60809d73dd | 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 MyClass {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int tc=sc.nextInt();
while(tc>0)
{
int n=sc.nextInt();
String arr[][]=new String[3][n];
for(int i=0;i<3;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 | 118b2b093ccd661b487d961a0d007ade | 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.HashSet;
import java.util.Scanner;
import java.util.Stack;
public class aaaaaa {
static HashSet<Character> set;
static Scanner sc;
public static void solve() {
HashSet<String> a = new HashSet<>();
HashSet<String> b = 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 | 0f7da496c1abd1acdf73c45bebfb5d88 | 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 s = new Scanner(System.in);
int t = s.nextInt();
while (t-- > 0) {
HashMap<String, Integer> app = new HashMap<String, Integer>();
int n = s.nextInt();
s.nextLine();
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 | 56c96846c49450e54ddf552871fe8820 | 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.io.*;
public class sol
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
for(int t=sc.nextInt();t>0;t--){
int n=sc.nextInt();
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 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 | 0044545e1e0733db107725cc0f955d6f | 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 | //Code By KB.
import java.beans.Visibility;
import java.io.*;
import java.lang.annotation.Target;
import java.lang.reflect.Array;
import java.nio.channels.AsynchronousCloseException;
import java.security.KeyStore.Entry;
import java.util.*;
import java.util.logging.*;
import java.io.*;
import java.util.loggi... | 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 | b94b339e3d3deee0daf9fb72316579b7 | 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 scan = new Scanner(System.in);
int casos = scan.nextInt();
while (casos > 0 && casos <= 100){
String pal;
int numeropalabra... | 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 8 | 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 | 23790280235ac814e23378eea78441f3 | 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 wordGame {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int testNumber = sc.nextInt();
while(testNumber>0){
int wordNumber = sc.nextInt();
int[] answer = 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 8 | 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 | 933b0674760cf4c6c1d3dcf891a428da | 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 C1722_WordGame {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
byte t = scanner.nextByte();
while (t-- > 0) {
short n = scanner.nextShort(), p1Score = (short) (3*n), p2S... | 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 8 | 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 | de98cc00429464b05941108bae70a4c6 | 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 {
private static Map<String,Integer> different;
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int test = cin.nextInt();
while (test -- > 0){
solve(cin);
}
}
private 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 8 | 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 | 69e8dc608193ffe990aea99ca8509863 | 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 {
private static Map<String,Integer> different;
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int test = cin.nextInt();
while (test -- > 0){
solve(cin);
}
}
private 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 8 | 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 | 81a695ead715f05ad5f6f4bc3439286f | 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();
for(int i=0;i<t;i++){
sc.nextLine();
int n=sc.nextInt();
List<String> lst=new ArrayList<>();
Ha... | 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 8 | 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 | b1437afb1bc7e9249a254f2d7d3c5552 | 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 cont = in.nextInt();
in.nextLine();
for(int k=0; k<cont; k++){
int words = in.nextInt();
in.nextLine();
Set<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 8 | 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 | d58d2093de2816398eff751b9d9561e5 | 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.Scanner;
import java.util.Map;
import java.util.HashMap;
public class Main
{
public static void main(String []args){
Scanner sc = new Scanner(System.in);
int c = sc.nextInt();
for(int i = 0; i < c; i++){
Map<String, ArrayList<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 8 | 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 | 18ce149d0b8a20688a012fb92ad07f9a | 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.math.*;
public class Codeforces
{
public static void main (String[] args) throws IOException
{
PrintWriter pt=new PrintWriter(System.out);
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int xyz=0; xyz<t; xyz++... | 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 8 | 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 | 237834dd2bc5f826b61659f796c0b8fc | 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 wordGame(String [][]a,int n) {
Map<String,Integer> map=new HashMap<>();
for(int i=0;i<3;i++) {
for(int j=0;j<n;j++) {
map.put(a[i][j],map.getOrDefault(a[i][j], 0)+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 8 | 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 | 713b7fde9348da6008432a332e6d6451 | 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 wordGame(String [][]a,int n) {
Map<String,Integer> map=new HashMap<>();
for(int i=0;i<3;i++) {
for(int j=0;j<n;j++) {
map.put(a[i][j],map.getOrDefault(a[i][j], 0)+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 8 | 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 | c18f126fa65943880016fd483e92ea9b | 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.*;
public class tes
{
public static void main (String[] args)throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
int n=sc.nextInt(),i,x=0,y=0,z=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 8 | 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 | cf4f53c81ab053d75f89338671f7cd09 | 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 Word_Game {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-- > 0)
{
int n=sc.nextInt();
int person=3;
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 8 | 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 | e658ed40ea4abc45b346e8693525fcc0 | 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.util.*;
public class Main{
static final int INF = 0x3f3f3f3f;
static final long LNF = 0x3f3f3f3f3f3f3f3fL;
public static void main(String[] args) throws IOException {
initReader();
int t=nextInt();
while (t--!=0){
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 8 | 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 | c94464220ac76f374f83ab95b3cd8333 | 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 | /******************************************************************************
Practice,Practice and Practice....!!
*******************************************************************************/
import java.util.*;
import java.io.*;
public class Main{
static class FastReader{
BufferedReader ... | 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 8 | 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 | a2aa826681074960ebdc45cdc13948a2 | 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) {
Scanner kali = new Scanner(System.in);
int dannyi = kali.nextInt();
for(int i = 0; i < dannyi; i++){
int num = kali.nextInt();
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 8 | 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 | 416ab0993b8a95ef0c85b4115d17c773 | 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 Rough {
public static void main(String[] args) {
HashMap<String,Long> map = new HashMap<>();
Scanner sc = new Scanner(System.in);
long t = sc.nextLong();
while(t-->0) {
long n = sc.nextLong();
String arr[][] = new String[3][(int) n];
for(int i=0; i<3; 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 8 | 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 | 54ac6b0277fa3f5a26a43f3be26b2dad | 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 WordGame {
public static void main(String[] args)throws Exception{
FastReader f=new FastReader(System.in);
int t=f.nextInt();
while (t-->0){
int n=f.nextInt();
HashMap<String, List<Integer>> wordMap=new HashMap<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 8 | 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 | bd9b5145188d3a0ea6bb005016b59181 | 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 IOException {
Fast f = new Fast(System.in);
int t = f.nextInt();
while (t--!=0)
{
int n = f.nextInt();
int [] ans = 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 8 | 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 | 9e838e9d9e2f3ca52636b5bbcf6647d8 | 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 IOException {
Fast f = new Fast(System.in);
int t = f.nextInt();
while (t--!=0)
{
int n = f.nextInt();
int [] ans = 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 8 | 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 | 70b3f18df71694e92b7682cabf8b2e4a | 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 Main {
public static void main(String[]args) throws NumberFormatException, IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t=Integer.pars... | 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 8 | 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 | 211f0eed676ca8f3b71147b614107dcb | 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 Practice {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t>0) {
int n=sc.nextInt();
String arr[][]=new String[3][n];
HashM... | 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 8 | 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 | 1061ab0802e7e1c37fa567e5e33a29f7 | 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 Practice {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t>0) {
int n=sc.nextInt();
String arr[][]=new String[3][n];
Has... | 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 8 | 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 | 2c74cc4e6eaab6b53f446dbbca0dae93 | 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 scan = new Scanner(System.in);
int num = scan.nextInt();
for(int i=0;i<num;i++){
int size=scan.nextInt();
int[] ans = 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 8 | 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 | 228ab65adc3ee688ed938c7458a73962 | 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 acmp {
public static void main(String[] args) {
Scanner css = new Scanner(System.in);
int t = css.nextInt();
for (int i = 0; i < t; i++) {
Map<String, Integer> map = new HashMap<>();
int n = css.nextInt();
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 8 | 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 | e2de00a318e4c087d6ac9fc69428a6b2 | 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.BigInteger;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.*;
import static java.lang.System.out;
public class app {
public static long m;
static int mod = 998244353;
static int inf = (int) 1e9;
public... | 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 8 | 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 | 5949f87ba076b04633fb1e850e67f05d | 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.lang.*;
import java.util.*;
import java.io.*;
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();
String [][] s=new String[3][n];
for(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 8 | 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 | 61034333856d04f31675e25e89be76be | 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) {
Scanner in = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int test = in.nextInt();
for(int t =1;t<=test;t++) {
int n = in.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 8 | 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 | f3bd769fbcf2d2a16c60e4408566ed3c | 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 ProblemB {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw = new PrintWriter(System.out);
public static void main(String[] args) throws IOException {
int t = Integer.parseInt(br.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 8 | 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 | b1733f5ba251f187adfeaa53ac13c4ea | 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.*;
public class A {
public static long gcd(long a, long b) {
return b == 0 ? a : gcd(b, a % b);
}
public static void print(int[] a) {
for (int i = 0; i < a.length; i++) {
System.out.print(a[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 8 | 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 | 747589e108f3a9bb6fc6f5346bb887ee | 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();
HashMap<String, Integer> map = new HashMap<>();
String arr[][] = 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 8 | 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 | e3902bf7b713b68a22709c653c4636a9 | 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.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
public final class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Buffe... | 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 8 | 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 | 1c624e6eeeef507b270b7cad00ff2b46 | 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.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
static Scanner sc = new Scanner(System.in);
static int n;
static String s1, s2, s3;
public static void main(String[] args) {
int _t = sc.nextInt();
while (_t... | 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 8 | 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 | 1d3bfbed8749e7932e6605467ec5574a | 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 codefoword {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i=0;i<n;i++){
int m = sc.nextInt();
HashSet<String> hm1 = 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 8 | 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.