USACO Silver 2017 January - Hoof, Paper, Scissors

Author: Óscar Garries and Mrinall Umausdhan

Official Analysis

C++

C++ Implementation

1#include <bits/stdc++.h>
2
3using namespace std;
4
5int main () {
6 freopen("hps.in", "r", stdin);
7 freopen("hps.out", "w", stdout);
8
9 int n;
10 cin >> n;

Java

Java Implementation

1import java.io.*;
2import java.util.*;
3
4public class hps {
5 static class InputReader {
6 BufferedReader reader;
7 StringTokenizer tokenizer;
8
9 public InputReader(File stream) throws FileNotFoundException {
10 reader = new BufferedReader(new FileReader(stream), 32768);

Give Us Feedback on USACO Silver 2017 January - Hoof, Paper, Scissors!

Join the Discussion!

Feel free to voice your thoughts in the comments section.