diff options
Diffstat (limited to 'problems/boatraceanalysis/attachments')
-rw-r--r-- | problems/boatraceanalysis/attachments/template.c | 21 | ||||
-rw-r--r-- | problems/boatraceanalysis/attachments/template.cpp | 21 | ||||
-rw-r--r-- | problems/boatraceanalysis/attachments/template.java | 22 | ||||
-rw-r--r-- | problems/boatraceanalysis/attachments/template.js | 9 | ||||
-rw-r--r-- | problems/boatraceanalysis/attachments/template.py | 11 |
5 files changed, 84 insertions, 0 deletions
diff --git a/problems/boatraceanalysis/attachments/template.c b/problems/boatraceanalysis/attachments/template.c new file mode 100644 index 0000000..0fa2b86 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.c @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int n; + scanf("%d", &n); fgetc(stdin); + for (int i = 0; i < n; i++) { + char analysis[1025]; + scanf("%[^\n]", analysis); fgetc(stdin); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("one line per boat with its position or one line per analysis causing an error\n"); + + return 0; +} diff --git a/problems/boatraceanalysis/attachments/template.cpp b/problems/boatraceanalysis/attachments/template.cpp new file mode 100644 index 0000000..2cb2feb --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.cpp @@ -0,0 +1,21 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + string analysis; + getline(cin, analysis); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "one line per boat with its position or one line per analysis causing an error" << endl; +} diff --git a/problems/boatraceanalysis/attachments/template.java b/problems/boatraceanalysis/attachments/template.java new file mode 100644 index 0000000..eba7341 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.java @@ -0,0 +1,22 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int n = in.nextInt(); + if (in.hasNextLine()) { + in.nextLine(); + } + for (int i = 0; i < n; i++) { + String analysis = in.nextLine(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("one line per boat with its position or one line per analysis causing an error"); + } +} diff --git a/problems/boatraceanalysis/attachments/template.js b/problems/boatraceanalysis/attachments/template.js new file mode 100644 index 0000000..7889d24 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.js @@ -0,0 +1,9 @@ +const n = parseInt(readline()); +for (let i = 0; i < n; i++) { + const analysis = readline(); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('one line per boat with its position or one line per analysis causing an error'); diff --git a/problems/boatraceanalysis/attachments/template.py b/problems/boatraceanalysis/attachments/template.py new file mode 100644 index 0000000..2c704f2 --- /dev/null +++ b/problems/boatraceanalysis/attachments/template.py @@ -0,0 +1,11 @@ +import sys +import math + +n = int(input()) +for i in range(n): + analysis = input() + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("one line per boat with its position or one line per analysis causing an error") |