Skip to content

Instantly share code, notes, and snippets.

View TechacademyCode's full-sized avatar

Techacademy Code TechacademyCode

View GitHub Profile
n = int(input())
list1 = list(map(int, input().split()))
x = int(input())
upper = 0
lower = 0
for i in list1:
if i > x:
upper += 1
else:
lower += 1
n = int(input())
list1 = list(map(int, input().split()))
minList = min(list1)
print(list1.count(minList))
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int m = a;
int n = b;
a = abs(a);
b = abs(b);
while (a != 0 && b != 0)
class Solution {
public:
vector<vector<int>> threeSum(vector<int>& nums) {
//nums[i] + nums[j] + nums[k] == 0
//nums[i] + nums[j] = -num[k]
vector<vector<int>> result;
sort(nums.begin(), nums.end());
for(int k = 0; k < nums.size() - 2; k++)
{
if(k > 0 && nums[k] == nums[k-1]) continue;
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string str;
cin >> str;
// https://lqdoj.edu.vn/problem/incsumm
#include <bits/stdc++.h>
using namespace std;
int const MAXN = 3e6 + 5;
long long x[MAXN] = {0}, y[MAXN] = {0}, a[MAXN] = {0};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
// https://marisaoj.com/problem/69
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int a[MAXN] = {0};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<long long> cnt(10, 0);
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
const long long N = 1e6 + 5;
long long h[N] = {0};
int main() {
std::ios_base::sync_with_stdio(false);
//https://lqdoj.edu.vn/problem/cppb1p526
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
unordered_map<int, int> h;
int main() {
int n;
cin >> n; // 5
for (int i = 0; i < n; i++)