diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
commit | 3496b0ed08c51e37e135e686b1632fd86f930c2c (patch) | |
tree | 1da44792489607070f3b4ca14d82af05b73e362b /problems/whatsthatprogression |
(init): Initialize repository.
Diffstat (limited to 'problems/whatsthatprogression')
35 files changed, 136 insertions, 0 deletions
diff --git a/problems/whatsthatprogression/attachments/template.c b/problems/whatsthatprogression/attachments/template.c new file mode 100644 index 0000000..ac44136 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.c @@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int income; + float mr; + int savings; + scanf("%d%f%d", &income, &mr, &savings); + int N; + scanf("%d", &N); + for (int i = 0; i < N; i++) { + int price; + int expenses; + scanf("%d%d", &price, &expenses); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("Yes, the house is affordable with 1 roommate(s) and $1 to spare.\n"); + + return 0; +} diff --git a/problems/whatsthatprogression/attachments/template.cpp b/problems/whatsthatprogression/attachments/template.cpp new file mode 100644 index 0000000..0f9ddf7 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.cpp @@ -0,0 +1,26 @@ +#include <iostream> +#include <string> +#include <vector> +#include <algorithm> + +using namespace std; + +int main() +{ + int income; + float mr; + int savings; + cin >> income >> mr >> savings; cin.ignore(); + int n; + cin >> n; cin.ignore(); + for (int i = 0; i < n; i++) { + int price; + int expenses; + cin >> price >> expenses; cin.ignore(); + } + + // Write an answer using cout. DON'T FORGET THE "<< endl" + // To debug: cerr << "Debug messages..." << endl; + + cout << "Yes, the house is affordable with 1 roommate(s) and $1 to spare." << endl; +} diff --git a/problems/whatsthatprogression/attachments/template.java b/problems/whatsthatprogression/attachments/template.java new file mode 100644 index 0000000..ee06c60 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.java @@ -0,0 +1,23 @@ +import java.util.*; +import java.io.*; +import java.math.*; + +class Solution { + + public static void main(String args[]) { + Scanner in = new Scanner(System.in); + int income = in.nextInt(); + float mr = in.nextFloat(); + int savings = in.nextInt(); + int N = in.nextInt(); + for (int i = 0; i < N; i++) { + int price = in.nextInt(); + int expenses = in.nextInt(); + } + + // Write an answer using System.out.println() + // To debug: System.err.println("Debug messages..."); + + System.out.println("Yes, the house is affordable with 1 roommate(s) and $1 to spare."); + } +} diff --git a/problems/whatsthatprogression/attachments/template.js b/problems/whatsthatprogression/attachments/template.js new file mode 100644 index 0000000..cb27e76 --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.js @@ -0,0 +1,15 @@ +var inputs = readline().split(' '); +const income = parseInt(inputs[0]); +const mr = parseFloat(inputs[1]); +const savings = parseInt(inputs[2]); +const N = parseInt(readline()); +for (let i = 0; i < N; i++) { + var inputs = readline().split(' '); + const price = parseInt(inputs[0]); + const expenses = parseInt(inputs[1]); +} + +// Write an answer using console.log() +// To debug: console.error('Debug messages...'); + +console.log('Yes, the house is affordable with 1 roommate(s) and $1 to spare.'); diff --git a/problems/whatsthatprogression/attachments/template.py b/problems/whatsthatprogression/attachments/template.py new file mode 100644 index 0000000..3fa952c --- /dev/null +++ b/problems/whatsthatprogression/attachments/template.py @@ -0,0 +1,15 @@ +import sys +import math + +inputs = input().split() +income = int(inputs[0]) +mr = float(inputs[1]) +savings = int(inputs[2]) +n = int(input()) +for i in range(n): + price, expenses = [int(j) for j in input().split()] + +# Write an answer using print +# To debug: print("Debug messages...", file=sys.stderr, flush=True) + +print("Yes, the house is affordable with 1 roommate(s) and $1 to spare.") diff --git a/problems/whatsthatprogression/data/secret/1.ans b/problems/whatsthatprogression/data/secret/1.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/1.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/1.in b/problems/whatsthatprogression/data/secret/1.in new file mode 100644 index 0000000..12339a4 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/1.in @@ -0,0 +1 @@ +1 2 4 8 16 32 diff --git a/problems/whatsthatprogression/data/secret/10.ans b/problems/whatsthatprogression/data/secret/10.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/10.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/10.in b/problems/whatsthatprogression/data/secret/10.in new file mode 100644 index 0000000..40e259c --- /dev/null +++ b/problems/whatsthatprogression/data/secret/10.in @@ -0,0 +1 @@ +-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 diff --git a/problems/whatsthatprogression/data/secret/11.ans b/problems/whatsthatprogression/data/secret/11.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/11.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/11.in b/problems/whatsthatprogression/data/secret/11.in new file mode 100644 index 0000000..0e91281 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/11.in @@ -0,0 +1 @@ +-1 2 -4 8 -16 32 -64 128 diff --git a/problems/whatsthatprogression/data/secret/12.ans b/problems/whatsthatprogression/data/secret/12.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/12.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/12.in b/problems/whatsthatprogression/data/secret/12.in new file mode 100644 index 0000000..4cae50e --- /dev/null +++ b/problems/whatsthatprogression/data/secret/12.in @@ -0,0 +1 @@ +128 -64 32 -16 8 -4 2 -1 diff --git a/problems/whatsthatprogression/data/secret/13.ans b/problems/whatsthatprogression/data/secret/13.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/13.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/13.in b/problems/whatsthatprogression/data/secret/13.in new file mode 100644 index 0000000..54708f7 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/13.in @@ -0,0 +1 @@ +-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 diff --git a/problems/whatsthatprogression/data/secret/14.ans b/problems/whatsthatprogression/data/secret/14.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/14.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/14.in b/problems/whatsthatprogression/data/secret/14.in new file mode 100644 index 0000000..8e9f1b3 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/14.in @@ -0,0 +1 @@ +-90 -81 -72 -63 -54 -45 -36 -27 -18 -9 0 diff --git a/problems/whatsthatprogression/data/secret/2.ans b/problems/whatsthatprogression/data/secret/2.ans new file mode 100644 index 0000000..8dc78e9 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/2.ans @@ -0,0 +1 @@ +Geometric Progression diff --git a/problems/whatsthatprogression/data/secret/2.in b/problems/whatsthatprogression/data/secret/2.in new file mode 100644 index 0000000..cce79f8 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/2.in @@ -0,0 +1 @@ +1 -3 9 -27 81 -243 diff --git a/problems/whatsthatprogression/data/secret/3.ans b/problems/whatsthatprogression/data/secret/3.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/3.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/3.in b/problems/whatsthatprogression/data/secret/3.in new file mode 100644 index 0000000..4d97e97 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/3.in @@ -0,0 +1 @@ +-1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 diff --git a/problems/whatsthatprogression/data/secret/4.ans b/problems/whatsthatprogression/data/secret/4.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/4.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/4.in b/problems/whatsthatprogression/data/secret/4.in new file mode 100644 index 0000000..7d7df09 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/4.in @@ -0,0 +1 @@ +-2 -4 -6 -8 -10 -12 -14 -16 diff --git a/problems/whatsthatprogression/data/secret/5.ans b/problems/whatsthatprogression/data/secret/5.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/5.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/5.in b/problems/whatsthatprogression/data/secret/5.in new file mode 100644 index 0000000..d374182 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/5.in @@ -0,0 +1 @@ +1 3 5 7 9 11 13 15 17 19 21 23 24 25 27 29 31 diff --git a/problems/whatsthatprogression/data/secret/6.ans b/problems/whatsthatprogression/data/secret/6.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/6.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/6.in b/problems/whatsthatprogression/data/secret/6.in new file mode 100644 index 0000000..0803afc --- /dev/null +++ b/problems/whatsthatprogression/data/secret/6.in @@ -0,0 +1 @@ +2 4 6 8 10 12 14 16 18 21 22 24 26 29 40 41 diff --git a/problems/whatsthatprogression/data/secret/7.ans b/problems/whatsthatprogression/data/secret/7.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/7.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/7.in b/problems/whatsthatprogression/data/secret/7.in new file mode 100644 index 0000000..7d43d2d --- /dev/null +++ b/problems/whatsthatprogression/data/secret/7.in @@ -0,0 +1 @@ +0 1 1 2 3 5 8 13 21 34 55 89 144 diff --git a/problems/whatsthatprogression/data/secret/8.ans b/problems/whatsthatprogression/data/secret/8.ans new file mode 100644 index 0000000..03c65c0 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/8.ans @@ -0,0 +1 @@ +Random diff --git a/problems/whatsthatprogression/data/secret/8.in b/problems/whatsthatprogression/data/secret/8.in new file mode 100644 index 0000000..ff05c48 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/8.in @@ -0,0 +1 @@ +0 9 18 27 36 45 54 63 72 81 90 99 100 108 117 126 135 diff --git a/problems/whatsthatprogression/data/secret/9.ans b/problems/whatsthatprogression/data/secret/9.ans new file mode 100644 index 0000000..e011657 --- /dev/null +++ b/problems/whatsthatprogression/data/secret/9.ans @@ -0,0 +1 @@ +Arithmetic Progression diff --git a/problems/whatsthatprogression/data/secret/9.in b/problems/whatsthatprogression/data/secret/9.in new file mode 100644 index 0000000..b5cbb2b --- /dev/null +++ b/problems/whatsthatprogression/data/secret/9.in @@ -0,0 +1 @@ +-6 -4 -2 0 2 4 6 8 diff --git a/problems/whatsthatprogression/domjudge-problem.ini b/problems/whatsthatprogression/domjudge-problem.ini new file mode 100644 index 0000000..4ab45cb --- /dev/null +++ b/problems/whatsthatprogression/domjudge-problem.ini @@ -0,0 +1,3 @@ +name = "What's That Progression?" +timelimit = 3 +points = 2 diff --git a/problems/whatsthatprogression/problem.pdf b/problems/whatsthatprogression/problem.pdf Binary files differnew file mode 100644 index 0000000..2687b7a --- /dev/null +++ b/problems/whatsthatprogression/problem.pdf |