uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
75eaf6ff-6633-4193-9bfe-939db91232a9
amJayem/C-Programming
oddEven/oddOrEvenCont.cpp
///A program to print Even or Odd number up to n. #include<stdio.h> int main() { int number,i,test; printf("1.Even numbers\n2.Odd numbers\n\nChoose: "); scanf("%d",&test); printf("Enter the number to get the chosen sequence:\n"); scanf("%d",&number); if(test == 1) { for(i = 1 ; i <...
ALGO
0.995984
3.173438
f4cd19a3-5c04-4e0b-8d34-5e70d97f1a69
rudalsd/Algorithm-Study
백준/자료 구조/16978. 수열과 쿼리 22.cpp
#include<iostream> #include<vector> #include<algorithm> #define ll long long using namespace std; struct query2 { int k, i, j; int seq; }; struct cmp { bool operator()(query2 left, query2 right) { return left.k < right.k; } }; int N, M; ll segTree[200000]; vector<pair<int, int>> query; vector<query2> queryArr...
ALGO
0.999943
4.267924
2e0a95bb-e714-4bfe-b222-dfdff9398ba9
marwan130/Leetcode
0035-search-insert-position/0035-search-insert-position.cpp
class Solution { public: int searchInsert(vector<int>& nums, int target) { int left = 0; int right = nums.size() - 1; while(left <= right) { int mid = left + (right - left) / 2; if(nums[mid] == target) { return mid; } else if(...
ALGO
0.999949
6.516689
05b7d442-5f10-40b9-bc8e-9e11a78982ef
MohitBaid/CodeChef
Others/NCC2018/NCC1803.cpp
#include<bits/stdc++.h> using namespace std; int prime(int n) { int i; for(i=2;i*i<=n;i++) { if(n%i==0) return 0; } return 1; } int main() { int T; cin>>T; while(T--) { int n,i; cin>>n; int A[n]; for(i=0;i<n;i++) { cin>>A[i]; } if(n==1) cout<<"Shivam\n"; else if(n==2 ) { if(__gcd(...
ALGO
0.999899
3.38903
c2a1d6c7-3eed-4b61-a794-84f00084fdfd
AMIRIOX/MyLuoguRepo
luogu/P1087.cpp
#include <iostream> #include <cstdio> #include <string> using namespace std; char checkFBI(string s) { bool is0=true, is1=true; for(string::iterator i=s.begin(); i!=s.end(); i++) { if((*i)=='1') is0=false; if((*i)=='0') is1=false; } if(is0) return 'B'; else if(is1) return 'I'; e...
ALGO
0.999959
3.875783
a7e51f48-5445-49d2-b1af-619de2ec4cef
chukwudiobianwu/2DGRAPHICS
ext/eigen/bench/spbench/test_sparseLU.cpp
// Small bench routine for Eigen available in Eigen // (C) Desire NUENTSA WAKAM, INRIA #include <iostream> #include <fstream> #include <iomanip> #include <unsupported/Eigen/SparseExtra> #include <Eigen/SparseLU> #include <bench/BenchTimer.h> #ifdef EIGEN_METIS_SUPPORT #include <Eigen/MetisSupport> #endif using namesp...
ALGO
0.995082
4.283109
6a7bc038-b8dd-4bc1-adf2-7164cad10443
maryskar/spbspu-labs-2022-aap-904-a
romanovich.artem/I2/countelements.cpp
#include "countelements.h" #include <cstddef> size_t countNegativeRightFromMax(const int *array, size_t size) { size_t countNegativeRightFromMax = 0; size_t maxElIndex = 0; if (size == 0) { return 0; } else { int maxEl = array[0]; for (size_t i = 0; i < size; i++) { if (array[i] > ma...
ALGO
0.998574
5.187307
6b537150-5513-4eb1-b58d-8618a8130de1
riadnwu/UGV_Lab
Summer-2023/OOAD/function/main.cpp
#include <iostream> using namespace std; void swap1(int *a,int b=10) { *a=*a+*b;//10+25=35 *b=*a-*b;//35-25=10 *a=*a-*b;//35-10=25 cout<<"From Swap Function:"<<endl; cout<<*a<<endl; cout<<"A:"<<*a<<endl; cout<<"B:"<<*b<<endl; return &a } int main() { int a=10,b=25; swap1(&...
ALGO
0.994542
4.528536
08f3c247-e65a-424b-b6a2-b2b71978387d
bananadroid/android_external_skia
src/core/SkM44.cpp
#include "include/core/SkM44.h" #include "include/core/SkMatrix.h" #include "src/base/SkVx.h" #include "src/core/SkMatrixInvert.h" #include "src/core/SkMatrixPriv.h" #include "src/core/SkPathPriv.h" bool SkM44::operator==(const SkM44& other) const { if (this == &other) { return true; } auto a0 = ...
TOOL
0.973784
7.307503
4a1d157a-be36-4a38-9e53-79ce9bddb95a
raincross7/code-similarity
codes/train_code/problem059/problem059_49.cpp
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++)//rep(i,回数){処理} using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n,x,t; cin >> n >> x >> t; if (n <= x) { cout << t << endl; } else { if (n%x == 0) { cout << (n/x) * t << end...
ALGO
0.999918
3.94483
220a73f3-8466-436f-b99e-24473938775f
YahorSharshniou/ZMP2025
l8/z1/288456_z1.cpp
#include <iostream> #include <string> using namespace std; class Pojazd { protected: string marka; string model; int rok_produkcji; public: void ustaw(string ma, string mo, int ro) { marka = ma; model = mo; rok_produkcji = ro; } ...
TOOL
0.916807
4.09242
f1b1dd08-0f66-433d-8652-3061106ae56f
hieu-ln/IT81-08
Code 2/Bai12_Lamthem_LeThiNgoc.cpp
#include<iostream> #include <iomanip> using namespace std; struct Node { int info; Node*next,*previous; }; Node*first,*last; void init() { first=NULL; last=NULL; } void process_list() { Node *p; p=first; while(p!=NULL) { cout<<p->info<<endl; p=p->next; } cout<<endl; } void insert_first(int x) { Node *p=n...
ALGO
0.99865
3.434763
b216fd68-7a21-405d-93c2-eb90c26a962a
KMsojib/Competitive-Programming
Codeforces/A_Nastia_and_Nearly_Good_Numbers.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) #define in_range(a,b) for(int i=a;i<b;i++) #define read(x) int x; cin >> x int main() { fast_io; int t; cin>>t; while(t--){ int x,y; cin>>x>>y; if...
ALGO
0.998364
3.587782
993071cf-2f5b-461c-be11-0953f23430a9
SonuAlex/100-Days-of-Code
Q26.cpp
// Q26 // You are given an m x n integer grid accounts where accounts[i][j] is the amount of money the ith customer has in the jth bank. Return the wealth that the richest customer has. // A customer's wealth is the amount of money they have in all their bank accounts. The richest customer is the customer that has the ...
ALGO
0.99867
5.731156
270e1d79-b9b3-4ced-97e4-ac2f61f3a230
waliallah19/PfLabweek6
Task3.cpp
#include<iostream> using namespace std; string checktitle(int,char); main() { int age; char gender; string title; cout<<"Enter your age: "; cin>>age; cout<<"Enter your gender(M for Male and F for Female): "; cin>>gender; title = checktitle(age,gender); cout<<title; } string checktitle(int age, char gender) { ...
TOOL
0.860331
3.514705
036fa3ad-1a4e-4471-bd52-b8abaa5fb465
SLAMWang/UGICP
thirdparty/Eigen/bench/dense_solvers.cpp
#include <iostream> #include "BenchTimer.h" #include <Eigen/Dense> #include <map> #include <vector> #include <string> #include <sstream> using namespace Eigen; std::map<std::string,Array<float,1,8,DontAlign|RowMajor> > results; std::vector<std::string> labels; std::vector<Array2i> sizes; template<typename Solver,type...
TOOL
0.998849
6.343297
a650553d-e67d-45ee-8a0e-a19235732bed
ssm0318/2019_ComputerProgramming
final_project-cpp/player.cpp
#include "player.h" int GainMaximizer::get_size() { return numbers.size(); } int LossMinimizer::get_size() { return numbers.size(); } int RegretMinimizer::get_size() { return numbers.size(); } multiset<int> & GainMaximizer::get_numbers() { return numbers; } multiset<int> & LossMinimizer::get_numbers() { return number...
ALGO
0.999743
5.013801
67c3bbb0-0bbd-490f-aeda-f6347e5132a8
khan-rasul/Codes
codeforces/1223A.cpp
/* * I'm a Ghost * Now you see me, now you don't * ~wrt CF obviously~ */ #include<bits/stdc++.h> #define fast() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define mod 1000000007 #define inf ((ll)1e18) #define eps 1e-9 #define ff first #define ss second #define pb push_back #define en...
ALGO
0.999923
3.935427
578a32c7-22ea-4bab-9f1c-c1312144088a
ishandutta2007/codeforces
tanphatls987/normal/322/C.cpp
#include <algorithm> #include <iostream> #include <fstream> #include <cstdlib> #include <cstring> #include <cmath> #include <deque> #include <vector> #include <queue> using namespace std; #define X first #define Y second #define INPUT freopen(".inp","r",stdin) #define OUTPUT freopen(".out","w",stdout) #define FOR(i,l...
ALGO
0.999987
3.582127
18248599-8442-4f75-b1ee-8e84957dcbf3
Mr-Bangladesh/Problem-Solving
SPOJ/BENEFACT - The Benefactor.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 999999999999999999 #define pb push_back #define mp make_pair #define MOD 1000000007 #define PI 2*acos(0.0) ll mod(ll B,ll M){ll X=B%M; if(X>=0) return X; else return M+X;} ///cin.ignore(); ll max(ll a,ll b) {if(a>b) return a; else return b;...
ALGO
0.999908
4.189981
8a1f96b9-7035-46c0-a9f7-8f05f2a67827
SergeyBrian/rev3
src/core/static/disas/disassembler.cpp
#include "disassembler.hpp" #include "../../../utils/logger.hpp" #include "capstone/x86.h" #include <cassert> #include <regex> #include <stdexcept> #include <string> #include <sstream> #include <queue> #include <set> #include <capstone/capstone.h> #ifdef X86_BUILD #define ACTIVE_CS_MODE CS_MODE_32 #else #define ACT...
ALGO
0.921575
5.778362
f5a4a5ce-2f4f-4be1-b556-4c69d267f786
Ayushkkkkkkk/cpp
atcoder.cpp
#include <iostream> #include <vector> #include <utility> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll n, m; vector<int> G[200005]; int color[200005]; P dfs(int v, int p, int c){ P ret = P(0, 0); color[v] = c; if(c == 1) ret.first++; else ret.second++; for(auto u : G[v]){ i...
ALGO
0.99975
4.622701
cb42b870-62da-4ebd-a42e-e7ee7907ce55
rasheduzzamanrakib/basic-cpp
39_continue.cpp
/*39_continue.cpp Author: Rasheduzzaman Student ID: CS-D-77-22-120080 Department: Computer Science Institute: Dhaka International University Location: Dhaka, Bangladesh Date: 13th December, 2023*/ #include<iostream> #include<conio.h> using namespace std; int main() { for( int i=1; i<=100; i++) { if(...
TOOL
0.996414
3.098088
b613e234-02d2-4d13-a520-01d1925c8b28
Elfinbolt/OS
priorityarrival.cpp
#include <iostream> using namespace std; class ProcessScheduler { private: int n; int process[100]; // Process ID int arrival[100]; // Arrival Time int burst[100]; // Burst Time int priority[100]; // Priority int wait[100]; // Waiting Time int turn[100]; // Tu...
ALGO
0.99998
5.498596
7a8bdb4c-2b10-4ce6-a2de-da6a30d47341
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/substring-with-largest-variance-Solution.largestVariance/177740_DoS_Exec_Code_Overflow_Mem._Corr..cpp
static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr TSRMLS_DC) /* {{{ */ { /* This is how the time string is formatted: snprintf(p, sizeof(p), "%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100, ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec); */ time_t ret; struct tm thetime; char * strbuf; ...
ALGO
0.989898
5.550416
b06e9b97-f425-41d7-b6f5-efa556a52320
luiztajra/HackerRank
Semana3/4_InheritedCode.cpp
#include <iostream> #include <string> #include <sstream> #include <exception> using namespace std; class BadLengthException : public exception{ int length; string message; public: BadLengthException(int n) : length(n){ message = to_string(n); } const char* what() ...
ALGO
0.999012
4.56159
2f563a5a-0553-4441-9a5d-77e03e056f39
vinodpatildev/leetcode-problem-solving
problems solved/00363-convert-sorted-list-to-binary-search-tree.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ /** * Definition for a binary tree node. * struc...
ALGO
0.999994
6.13598
a8a04355-1470-4b73-aa99-4de64c9c4254
sinyeong10/codetree-TILs
250607/두 사람/two-person.cpp
#include <iostream> using namespace std; int main() { // Please write your code here. char gen_a, gen_b; int age_a, age_b; cin >> age_a >> gen_a >> age_b >> gen_b; if ((age_a >= 19 && gen_a == 'M') || (age_b >= 19 && gen_b == 'M')){ cout << 1; } else { cout << 0; } retur...
ALGO
0.999413
3.052286
d9026a10-80fc-460c-aacb-adb452281e7f
Prateekbhagat/C-Plus-Plus-
4. Looping/Nested_if_else_79A.cpp
#include<iostream> using namespace std ; int main(){ int score{}; cout << "Enter the score on the exam (0-100) : \n" ; cin >> score ; char letter_grade{}; if (score >= 0 && score <=100){ if (score >=90) letter_grade = 'A' ; else if (score >=80 && score < 90) l...
TOOL
0.861244
3.824718
89260c54-83cf-4879-95de-95705dad61e1
P4ZD4N/pjatk
PJC/PJC_2/3.cpp
#include <vector> #include <set> #include <fmt/ranges.h> auto iterateEveryNElements(std::vector<int> vec, int n) -> void { using namespace std; for (auto iterator = vec.begin(); iterator < vec.end(); iterator += n) { fmt::print("{} ", *iterator); } } auto iterateEveryNElements(std::set<int> set,...
ALGO
0.988621
6.276066
b84dc440-5f76-4eb3-b214-1781233b7a73
AkshatSharma1/DSA
HashTable/longestSubarraywithSumK.cpp
#include<bits/stdc++.h> using namespace std; int maxLength(int* arr,int n,int k) { int sum=0; int maxLen = INT_MIN; unordered_map<int,int> m; //find prefix sum for(int i=0;i<n;i++) { sum+=arr[i]; if(sum==k) { maxLen = i+1; } else { ...
ALGO
0.999946
5.088789
9aa28ecd-123b-4830-9884-10912fd3a761
WithLei/step-by-step
HDU/2.1.6七夕节.cpp
#include<cstdio> #include<cstdlib> #include<cstring> #include<string> #include<iostream> #include<algorithm> #include<sstream> #include<vector> #include<cmath> #include<set> typedef long long LL; using namespace std; long long f(int num){ long long range=1; int i; for(i=2;i<sqrt(num);i++){ if(num%i==0){ range+...
ALGO
0.999825
4.424109
15365807-79df-44a1-aba4-b37e323188ea
Withnoidea/OJ
luogu/Luogu_P_1553.cpp
#include <bits/stdc++.h> using namespace std; string reverse_num(string s) { reverse(s.begin(), s.end()); // 去除前导零,但保留至少一个零 int i = 0; while (i < s.size() - 1 && s[i] == '0') { i++; } s = s.substr(i); return s.empty() ? "0" : s; } string reverse_decimal(string s) { reverse(s.begin(), s.end()); ...
ALGO
0.99865
4.285553
6c68e6a5-8c47-47d5-8174-2c159d5bb954
abhikumar002/Competitive-Programming
codeforces/test2.cpp
#include <iostream> #include <bits/stdc++.h> #define ll long long int using namespace std; /* int main() { // your code goes here int T; cin>>T; while(T--) { char bin[1000]; int c; cin>>c; itoa(c,bin,2); string s = to_string(11001.99); cout<<bin<<endl<<s<<endl; } // getch(); return 0; } */...
ALGO
0.999415
4.319724
908a8600-288d-487c-a11a-5c9218c1cdff
freezerspace/Leetcode
0051-n-queens/0051-n-queens.cpp
class Solution { public: void f(int row,int n,vector<string>&board,vector<vector<string>>&ans){ if(row==n){ ans.push_back(board); return; } for(int col=0;col<n;col++){ bool queen=false; for(int k=1;k<=row;k++){ // check for row=...
ALGO
0.999903
5.306497
f7ef1578-078f-485a-b4a4-e8eb9af17c3a
littley-y/AlgorithmStudy
기초/5. BFS/YT/13549.cpp
#include <deque> #include <iostream> using namespace std; const int MAX = 1000001; int N, K; int location[MAX]; deque<int> deq; void BFS() { deq.push_back(N); location[N] = 1; while (true) { int curr = deq.front(); deq.pop_front(); if (curr == K) break; if (curr * 2 < MAX && location[c...
ALGO
0.999976
4.846414
9db0d803-fc32-4a8c-b2cf-47cf4a8fd5c5
hamashle/research-goods
mncore2-emu-code/write-vsm.cpp
#include <iostream> #include <fstream> #include <string> void writeFilesAlternately(const std::string &file1, const std::string &file2, const std::string &outputFile, int iterations) { // Open the input files std::ifstream inputFile1(file1); std::ifstream inputFile2(file2); if (!inputFile1.is_open() |...
ALGO
0.905488
5.879103
bd83d2aa-edfe-4394-bf23-4c6d080ba4a7
SebasHerPorras/tareas-programadas-oper
TP1/convertirEntrada.cpp
#include "convertirEntrada.hpp" std::vector<std::string> dividirEntrada(const std::string& entrada, char delimitador) { std::vector<std::string> resultado; std::stringstream ss(entrada); std::string token; while (std::getline(ss, token, delimitador)) { resultado.push_back(token); } return resultado; }...
ALGO
0.998084
4.057853
4a35f931-fca8-49c0-9dfe-ffb806283bc2
AAM77/CPP-Programs
lab3a.cpp
/* Author: Mohammad Adeel Course: {136} Section: Tuesday 7:00PM - 8:50PM Instructor: G.P. Assignment: "Lab 3, Task 1" This program computes the factorials n!, k!, and (n-k)! after receiving input from the user for value of n & k. It use the type 'int' for all of the values to do the calculations. */ // TASK...
ALGO
0.999583
4.278949
51d975fd-c1ea-4ff0-a622-9d6bb036eb34
cslinux/LTE-Cell-Scanner
src/itpp_ext.cpp
#include <itpp/itbase.h> #include <sys/stat.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <curses.h> #include "rtl-sdr.h" #include "common.h" #include "macros.h" // 'Extensions' to itpp that probably should have been included in itpp. namespace itpp_ext { using namespace itpp; using namespac...
TOOL
0.895148
5.588776
a938e937-4523-45ad-ae63-515c0bdbab62
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_8146_3.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("sse4,avx,avx2,fma") using namespace std; const string nl = "\n"; using ll = int64_t; using vi = vector<int>; using vl = vector<ll>; using pii = pair<int, int>; using pll = pair<ll, ll>; using str = string; using vpii = vector<pii>; using vpll = ...
ALGO
0.999686
4.440692
b0da9a71-8db9-4ee1-b274-624a0dc2787f
afsulthon/competitive-programming
eolymp/19_Degree_of_symmetry.cpp
#include <cstdio> #include <cstring> #include <cmath> using namespace std; int main() { char n[15]; scanf("%s", n); int i = ceil((double)strlen(n) / 2), DOS = 0, a = 0, b = strlen(n) - 1; while (i--) { if (n[a] == n[b]) DOS++; a++; b--; } printf("%d\n", D...
ALGO
0.999707
3.980999
712d2b51-a2ae-4f19-9e90-362f2a9ad549
AryanNanda17/Consistent_cpp
Daily_Practice/Week1_ArraysAndSortingAlgos/Day5/paintTheArray.cpp
#include<iostream> #include <numeric> #include<map> #include<bits/stdc++.h> #include<algorithm> #define ll long long #define mod 1000000007 using namespace std; void precal(){ } void solve(){ ll n; cin>>n; vector<ll>v(n); for(int i=0;i<n;i++)cin>>v[i]; vector<ll> ans1; vector<ll> ans2; for(i...
ALGO
0.99999
3.977906
fd3b69d2-95ab-452c-8e1f-0da77e63326f
king-yyf/cpcode
atcoder/abc245/2.cpp
#include <bits/stdc++.h> using namespace std; #define all(c) (c).begin(), (c).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define sor(x) sort(all(x)) #define f1(e) for(int i=0;i<(e);++i) #define f2(i,e) for(int i=0;i<(e);++i) #define f3(i,b,e) for(int i=(b);i<(e);++i) #define f4(i,b,e...
ALGO
0.999863
4.141287
bd6a0461-0d98-41ca-9bb0-4ecd85b53019
chinmay-gupta-2003/POTD
2024/9_September/12th_1684_Count_the_Number_of_Consistent_Strings.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int countConsistentStringsBetter(string allowed, vector<string> &words) { vector<int> freqArray(26, 0); for (char ch : allowed) freqArray[ch - 'a']++; int result = 0; for (string word : words) { bool flag = tr...
ALGO
0.999901
5.640185
486a0374-f6d3-4231-aeca-be5536e36487
rahulkumar430/C_plus_plus_programming
16.Hashing/map.cpp
#include <bits/stdc++.h> using namespace std; int main() { map<string, int> m; //1.Insert m.insert(make_pair("Mango", 100)); pair<string, int> p; p.first = "Apple"; p.second = 120; m.insert(p); m["Banana"] = 20; //2. Search string fruit; cin >> fruit; auto it = m.find(fruit); if (it != m.end()) { c...
ALGO
0.985284
4.62486
dedc883e-6c57-493c-99b2-7ec7ce314f6f
WETLION/ROKA
BOJ/특별한 날.cpp
#include <iostream> // 10768번 특별한 날 using namespace std; int m, d; int main() { cin >> m >> d; if(m == 2 && d == 18) cout << "Special"; else if(m < 2 || m == 2 && d < 18) cout << "Before"; else cout << "After"; return 0; }
ALGO
0.999675
4.137107
42c9e7b2-df07-4d8a-99bd-eb8390652b22
otavioon/COLA-2022-Tools
datasets/src/optz/codenet/1/p03700_s332177001.cpp
// https://beta.atcoder.jp/contests/abc063 // status: [review] #define SUBMIT #include <bits/stdc++.h> using namespace std; using ui64 = uint64_t; using i64 = int64_t; const int MAX_N = 100000; int h[MAX_N]; int N, A, B; int diff; int main() { #ifdef SUBMIT auto& stream = cin; #else stringstream stream(R"(4...
ALGO
0.999869
3.998278
e12541dd-3b2a-4b76-96ae-90abf72116ad
ibharath462/everything_ZoHo
exp1_4.cpp
#include<iostream> #include<vector> using namespace std; int main(){ //Binary decimal problem... int n,t; vector<int> two,three,answer; two.push_back(1);two.push_back(10);two.push_back(11); three.push_back(100);three.push_back(101); three.push_back(110);three.push_back(111); cin>>n; t=n; int digits=0; while(...
ALGO
0.999218
3.161645
7c40ae48-68d4-4c41-99dd-54f3b61c3a16
prakhar-161/Programming-puzzles
05. Print 1 to N without loop/02-using_recursive_main_func.cpp
#include<iostream> using namespace std; #define N 100 int main() { static int i = 0; if(i++ < N) { cout << i << " "; main(); } return 0; }
ALGO
0.997104
3.25712
b9492857-40ef-4069-98d1-763febc58911
saikuladeepgithub/Leetcode
0945-minimum-increment-to-make-array-unique/0945-minimum-increment-to-make-array-unique.cpp
class Solution { public: int minIncrementForUnique(vector<int>& nums) { // set <int> mpp; // int n=nums.size(); // int sam=0; // for(int i=0;i<n;i++) // { // int key=nums[i]; // while(mpp.contains(key)) // { // sam=s...
ALGO
0.999988
5.904715
e656c470-db0e-429d-8a29-2ff12c4f8c42
ShoroukELSayed/automata_practical_exam_4486
Turning_Machine/main.cpp
#include <iostream> #include <cstring> using namespace std; // Function to increment a binary number represented as a character array char* incrementBinary(char tape[]) { int len = 0; while (tape[len] != '\0') len++; static char newTape[100]; newTape[0] = '_'; for (int i = 0; i < len; i++) { ...
ALGO
0.999749
7.567099
6ee7e260-f429-423d-b3f4-4c8f3af990ff
zxth93/leetcode
561_ArrayPartition1.cpp
#include <stdio.h> #include <iostream> #include <algorithm> #include <vector> using namespace std; class Solution { public: int arrayPairSum(vector<int>& nums) { sort(nums.begin(), nums.end()); int sum = 0; for(int i =0; i<nums.size();i+=2){ sum += nums[i]; } ...
ALGO
0.999728
5.132127
09683038-29f3-4ba0-890d-53196a2f4486
haeun-i/CodingTest
KHE/BOJ_1389.cpp
#include <iostream> #include <queue> #include <cstring> #include <vector> #include <algorithm> using namespace std; vector<pair<int, int>> res; bool visited[101] = { 0, }; int depth[101] = { 0, }; int graph[101][101] = { 0, }; int n, m; void bfs(int s) { queue<int> q; q.push(s); visited[s] = 1; while (!q.empty()...
ALGO
0.99997
4.083566
6a6a36b9-b184-407f-87d3-f5a832f365a4
john121619/Simple_project
15_revers_number.cpp
// write a c++ program to enter a number and print its revers #include<iostream> using namespace std; int main() { int n, revers = 0; cout<<"plese enter a number"<<endl; cin>>n; int originalNumber = n; bool isNegative = n < 0; n = abs(n); while(n > 0) { int digit = n%10; rev...
ALGO
0.999114
3.771654
ab435ad2-7f50-4735-b1c1-90840364f928
raincross7/code-similarity
codes/train_code/problem193/problem193_265.cpp
#include <vector> #include <stack> #include <queue> #include <list> #include <bitset> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <numeric> #include <iostream> #include <iomanip> #include <string> #include <chrono> #include <random> #include <cmath> #inc...
ALGO
0.999836
4.214215
d34b1e70-23ed-42ec-a9ab-30193f5b4402
pcernek/cpsc534l-project
code/src/optimize/greed_ratio_minimizer.cpp
// // Created by paul on 04/01/18. // #include "greed_ratio_minimizer.h" #include <algorithm> #include <messages.h> /** * TODO: This class contains much code duplicated from greedy_minimizer. Consider merging. */ hh::greed_ratio_minimizer:: greed_ratio_minimizer(constraint_t c, set_function_t submodular_denominat...
ALGO
0.99996
6.289042
46227133-5e47-4237-8fcb-24f53217e7ad
Ash1912/Coding-Lab
DAA (C & C++)/LAB 1/HOME EXERCISE/Q8.cpp
// Write a program to display an array of n integers (n>1), where at every index of the array should contain the // product of all elements in the array except the element at the given index. Solve this problem by taking single loop // and without an additional array. // Input Array : 3 4 5 1 2 // Output Array :40 30...
ALGO
0.99995
4.733452
fee8d147-9c44-4ad5-aa7a-8a438bb336f3
Wayoung7/ProceduralCityGeneration
src/CityGen.cpp
#include "CityGen.h" #include "GlobalConfig.h" #include "GlobalData.h" #include "random.hpp" using Random = effolkronium::random_static; void CityGen::addRoad(RoadSeg *road) { Vec2 mid = (road->getSt() + road->getEd()) / 2.f; roads[calCell(mid)].push_back(road); } std::pair<int, int> CityGen::calCell(const V...
ALGO
0.998914
5.136845
ef06807d-eb26-4f58-a426-ddf74afeb3cb
ravikr126/DATA-STRUCTURE
DP (2D)/Longest Increasing Subsequence.cpp
/* Longest Increasing Subsequence Send Feedback Given an array with N elements, you need to find the length of the longest subsequence in the given array such that all elements of the subsequence are sorted in strictly increasing order. Input Format The first line of input contains an integer N. The following line con...
ALGO
0.999988
5.775887
abf150e7-707d-48be-b1aa-d21c642b9582
yulonglong/UVa-Solutions
12269.cpp
//Steven Kester Yuwono - UVa 12269 #include <cstdio> #include <iostream> #include <algorithm> using namespace std; bool complete(int n,double w,double width){ double mow[1010]; for(int i=0;i<n;i++){ scanf("%lf",&mow[i]); } sort(mow,mow+n); if(mow[0]>w/2){ return false; } el...
ALGO
0.999175
3.428879
2d79a537-d881-4944-b0c4-fc5c94b59183
Riajain05/DSA-series
seccond_largest_ele.cpp
#include <iostream> using namespace std; secondLargest(int arr[], int n) { int max = INT16_MIN; for (int i = 0; i < n; i++) { if (arr[i] > max) { max = arr[i]; } } int max2 = INT16_MIN; for (int i = 0; i < n; i++) { if (arr[i] > max2 && arr[i] != ...
ALGO
0.999199
4.493944
57cba61e-0e38-4949-977b-5200d66df923
vbonnici/grafe-sim
analysis/data/p02271/s317519214.cpp
#include <iostream> #include <vector> using namespace std; int sum(vector<int> v){ int sum = 0; for(int i=0;i<v.size();i++){ sum +=v[i]; } return sum; } bool gtsum(vector<int> v,int x){ if(sum(v)<x) return true; else return false; } bool hantei(vector<int> v, int x){ ...
ALGO
0.999978
4.667866
eabeb312-9715-46ef-b4ce-a137bdc954b6
Yoo-jung/Ai-argorithm-with-C
0109/ai/ai_2.cpp
#include <stdio.h> class Neuron{ private: double w, b;//class외부에서 값을 알 수 없기에 print 명령어를 통해 출력 필요 public: Neuron(); ~Neuron(); double sigma_f(double x); double act_f(double sigma); double feedForward(double x); void printf_f(double x, double y_want); void setWB(double w, double b); void backProp(do...
ALGO
0.992791
4.203629
b6b960c5-812f-4b3b-b5af-e4f47b96906a
pchaya/CS_Coursework
CS163: Data Structures/lab/lab6/cs163_lab6.cpp
#include "cs163_table.h" using namespace std; int main() { table my_journal; journal_entry to_add, an_entry; char title[100]; char notes[300]; //Let's add some items ot the journal first do { cout <<"Please enter a title: "; cin.get(title, 100); cin.ignore(100,'\n'); ...
TOOL
0.896408
4.339815
b479c7f4-08fb-4120-81f1-2060430fc156
sarveshsingh6395/cpp-dsa
nested member funtion.cpp
#include<iostream> using namespace std; class number{ int a; public: void getdata(void); int task(void); void display(void); }; void number :: getdata(void) { cout<<"Enter any number: "<<endl; cin>>a; } int number :: task(void) { int x; if(a%5==0) { x=0; return (x); } else { x= a%5; return (x); ...
ALGO
0.998174
3.199003
95e43e12-409e-49ab-98a5-e4952a241003
almax87/MultiThreading
Lesson2/Task2/src/main.cpp
#include <iostream> #include <cmath> #include <vector> #include <thread> #include <chrono> #include <mutex> #include <atomic> std::mutex cout_mutex; void calculate (long int count_length, int thread_num, std::atomic<bool>& done_flag) { auto start_time = std::chrono::steady_clock::now(); long double j{}; s...
TOOL
0.990132
4.277366
36f57e39-b5f7-42a3-8de7-b55b915eb1cc
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/tc_generated_progs_cpp/p03620/p03620_num4_parsed.cpp
#include <bits/stdc++.h> using namespace std; using pii = pair<int,int>; #define f(i,a,b) for (int i = a; i < b; i++) #define fr(i,a,b) for (int i = b-1; i >= a; i--) #define Min(a,b) a=min(a,b) #define Max(a,b) a=max(a,b) #define pb push_back const int oo = 1e9; string a,b; int n; int solve() { n = a.length();...
ALGO
0.999577
3.950868
6e54c6e7-3c0d-40a7-9d75-40ab4d8b91e7
my-carla/llvm-carla
projects/libcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp
// <algorithm> // template<InputIterator InIter1, InputIterator InIter2, typename OutIter, // Predicate<auto, InIter2::value_type, InIter1::value_type> Compare> // requires OutputIterator<OutIter, InIter1::reference> // && OutputIterator<OutIter, InIter2::reference> // && CopyConstructible<C...
TEST
0.999128
6.875024
0fddd726-150f-49b3-8417-dbc686ffeae9
lclpsoz/competitive-programming
ARCHIVE/2019-06-05-2000/1132F.cpp
#include "bits/stdc++.h" using namespace std; ////////////// Prewritten code follows. Look down for solution. //////////////// #define x first #define y second #define len(x) ((int)(x).size()) using pii = pair<int, int>; using ll = long long; using llu = long long unsigned; using ld = long double; const ld EPS = 1e-9...
ALGO
0.999974
4.213918
d177dfed-9db0-46fb-b3a6-420920500dc1
ryder1986/language-learning
cpp/cpp-v5/c18/lambda0.cpp
// lambda0.cpp -- using lambda expressions #include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <ctime> const long Size1 = 39L; const long Size2 = 100*Size1; const long Size3 = 100*Size2; bool f3(int x) {return x % 3 == 0;} bool f13(int x) {return x % 13 == 0;} int main() { using s...
ALGO
0.98747
6.214391
32382d91-3d75-46aa-b53f-37d655b9d64b
huangallen2008/cppcode
code/CSES/Range Updates and Sums/Range Updates and Sums.cpp
#include<bits/stdc++.h> using namespace std; // #pragma GCC optimize("O3,unroll-loops") // #pragma GCC target("avx2,sse4,bmi2,popcnt") #define int long long #define REP(i,n) for(int i=0;i<(n);i++) #define REP1(i,n) for(int i=1;i<=(n);i++) #define RREP(i,n) for(int i=(n)-1;i>=0;i--) #define RREP1(i,n) for(int i=(n);i>=1...
ALGO
0.999781
4.86539
06b79e92-30b0-4b78-8c2f-2d638939fefb
Prem2310/Leetcode
242-valid-anagram/valid-anagram.cpp
class Solution { public: bool isAnagram(string s, string t) { vector<int> mp(26, 0); for (char c : s ){ mp[c-'a']++; } for (char c : t ){ mp[c-'a']--; } for(int i : mp){ if(i != 0){ return false; } ...
ALGO
0.999994
6.33438
4d6a5a58-c7c7-4706-91e0-8175b7b417a9
keshav896/PW-Decode-DSA-with-C-2.O
Assignment-3/leftSideView.cpp
#include<iostream> #include<queue> using namespace std; class TreeNode{ public: int value; TreeNode* left; TreeNode* right; TreeNode(int value){ this->value=value; this->left=NULL; this->right=NULL; } }; TreeNode* ConstructTree(int array[],int size){ queue<TreeNode*...
ALGO
0.999978
4.107663
20cfedee-9459-445f-9023-2ad88d6933e7
LQH1997/Sicily
Discrete mathematics/1009.cpp
#include<iostream> #include<cstring> using namespace std; bool sudoku(int g[9][9]) { int i = 0, j = 0, k = 0; int ifTrue = 0; int arr[10] = {0}; for(i = 0; i < 9; i++) { //if(ifTrue == 1) break; memset(arr,0,sizeof(arr)); for(j = 0; j < 9; j++) { arr[g[i][j]] += 1; if(arr[g[i][j]] >= 2) { ifTrue += ...
ALGO
0.999914
4.695412
9744e602-8816-4458-9d8e-92ac44ef0de1
Pritesh-D-0/Rusty
src/modules/mc_att_control/AttitudeControl/AttitudeControl.cpp
/** * @file AttitudeControl.cpp */ #include <AttitudeControl.hpp> #include <mathlib/math/Functions.hpp> using namespace matrix; void AttitudeControl::setProportionalGain(const matrix::Vector3f &proportional_gain, const float yaw_weight) { _proportional_gain = proportional_gain; _yaw_w = math::constrain(yaw_weig...
ALGO
0.949653
6.260171
5b58fe8d-bb69-4d33-8748-b5d151486c95
Cartallum/llvm-project-cbe-rustc
libc/src/math/generic/nearbyintf.cpp
#include "src/math/nearbyintf.h" #include "src/__support/FPUtil/NearestIntegerOperations.h" #include "src/__support/common.h" namespace __llvm_libc { LLVM_LIBC_FUNCTION(float, nearbyintf, (float x)) { return fputil::round_using_current_rounding_mode(x); } } // namespace __llvm_libc
ALGO
0.991599
6.352951
71e5f173-b490-4799-9045-e220b4c7fdbd
vedanty3/dsa-codeground
leetcode-gfg-solutions/gfg-solutions/Reverse a sublist of a linked list.cpp
// https://practice.geeksforgeeks.org/problems/reverse-a-sublist-of-a-linked-list/1 class Solution { public: Node *reverseBetween(Node *head, int m, int n) { if (!head or !head->next or m == n) return head; Node *dummy = new Node(0); dummy->next = head; Node *prev = ...
ALGO
0.999961
5.932245
8bb87eef-6037-47ed-80b9-fef8e890ef1a
Andrielson/scipy
scipy/_lib/highs/src/simplex/HEkkDualRHS.cpp
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the HiGHS linear optimization suite */ /* */ /* Written an...
ALGO
0.999632
4.07808
577901dd-ee24-4c77-a495-7cdb566b0443
anmolsahu2k/DSA
Queues/28. reverse_first_k.cpp
// { Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; queue<int> modifyQueue(queue<int> q, int k); int main() { int t; cin >> t; while (t-- > 0) { int n, k; cin >> n >> k; queue<int> q; while (n-- > 0) { int a; ...
ALGO
0.999737
5.342633
e46b8acf-2014-40fb-950e-7bf712d8bed8
llvm-pic/llvm-pic
libc/src/math/generic/fminimum_numf16.cpp
#include "src/math/fminimum_numf16.h" #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(float16, fminimum_numf16, (float16 x, float16 y)) { return fputil::fminimum_num(x, y); } } // namespa...
ALGO
0.998448
6.352323
73729b53-43c7-43a6-a67e-71c5460298d6
huwenao/mteasan
llvm-project/clang/unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp
#include "TestVisitor.h" #include "clang/AST/LexicallyOrderedRecursiveASTVisitor.h" #include <stack> using namespace clang; namespace { class DummyMatchVisitor; class LexicallyOrderedDeclVisitor : public LexicallyOrderedRecursiveASTVisitor<LexicallyOrderedDeclVisitor> { public: LexicallyOrderedDeclVisitor(Dum...
TEST
0.854133
7.817199
56b77641-1074-4c28-b346-55730380bcda
ishandutta2007/codeforces
magga/normal/1689/E.cpp
#include<bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #define filei freopen("input.txt", "r", stdin); #define fileo freopen("output.txt", "w", stdout); #define gooi cout<<"Case #"<<i+1<<": "...
ALGO
0.99991
4.135007
22257296-c2bb-4942-8323-75c359c5f956
HekpoMaH/Olimpiads
grupa B/proleten/2012/2012-06-10-tests&authors-B/2-maxsum/author/maxsum-20-1.cpp
#include <stdio.h> #define MAXN 1001 #define INF -2000000000 long a[MAXN][MAXN]; int N, K; long answ = INF, csum; void readInput() { int i, j; scanf("%d %d", &N, &K); for (i = 0; i < N; i++) for (j = 0; j < N; j++) scanf("%ld", &a[i][j]); } long max(long a, long b) { return (a > b ? a : b); } void go(x,...
ALGO
0.999764
3.441253
bb69f23a-5f77-476d-ae86-e8cef7c03d6a
Gyuchool/Algorithm
baekjoon/암호 만들기.cpp
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; vector<char> v; vector<char> ans; int l, c; int cnt;//모음 int visited[28]; int ncnt = 0;//자음 void make(int size, int start) { if (size == l) { if (cnt == 0) {//모음없으면 return; } if (ncnt < 2) {//자음 2개 미만 retu...
ALGO
0.999907
3.089816
013ce929-676c-4e66-acaa-29a8c5b4b56e
Aparnaraha/Coder-Army
Lecture-08/bitwise-operator.cpp
#include <iostream> using namespace std; int main(){ // Bitwise Operators // &, |, ^, ~, <<, >> // and (&) Operator int ans_1 = 25 & 10; cout << "25 & 10 Output is " << ans_1 << endl; // or (|) Operator int ans_2 = 6 | 3; cout << "6|3 Output is " << ans_2 << endl; // Xor (^) Oper...
ALGO
0.952493
3.797996
a4acd5e3-d09a-46c6-a974-be9a263f2d84
matsjoyce/shyphe
src/body.cpp
#include "body.hpp" #include "utils.hpp" #include "shape.hpp" #include "sensor.hpp" #include <algorithm> #include <cmath> #include <numeric> using namespace std; using namespace shyphe; Body::Body(const Vec& position_/*={}*/, const Vec& velocity_/*={}*/, double angle_/*=0*/, double angular_velocity_/*=0*/...
ALGO
0.989014
7.448451
7ac486ca-f3c9-4db6-8663-cad25b13d1cf
pari-1920/godot.py
thirdparty/oidn/mkl-dnn/src/cpu/nchw_pooling.cpp
#include <assert.h> #include <math.h> #include "c_types_map.hpp" #include "type_helpers.hpp" #include "math_utils.hpp" #include "mkldnn_thread.hpp" #include "nstl.hpp" #include "nchw_pooling.hpp" namespace mkldnn { namespace impl { namespace cpu { template <impl::data_type_t data_type> void nchw_pooling_fwd_t<data_...
ALGO
0.995644
7.444957
ee1f5799-6de2-4812-abbf-3cbd13a75140
Shubhamp6/CP_Codes_Cpp
codeforces/A_Cinema_Line.cpp
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); int n; cin >> n; int a[n]; map<int, int> m; for (int i = 0; i < n; i++) { cin >> a[i]; } int flag = 1; for (int i = 0; i < n; i++) { ...
ALGO
0.999898
4.143679
2b867186-6700-4c61-989e-b1a22eb45347
mstrechen/competitive-programming
CodeForces.com/regular_rounds/#375/F.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; struct DSU { vector<int> p; DSU(int n = 0) { p.assign(n,0); for(int i = 0; i<n; i++) p[i] = i; } int get(int i) { if(p[i]==i) return i; return (p[i] = get(p[i]))...
ALGO
0.999987
4.288097
880cea14-cb95-4066-8f84-562a6bfab4ab
aayush2761/Leetcode_prob
2779-maximum-beauty-of-an-array-after-applying-operation/2779-maximum-beauty-of-an-array-after-applying-operation.cpp
class Solution { public: int maximumBeauty(vector<int>& nums, int k) { int n = nums.size(); vector<int> diff(200002, 0); // Adjust size to cover large bounds for (int i = 0; i < n; i++) { int left = max(0, nums[i] - k); int right = nums[i] + k; d...
ALGO
0.999975
6.031157
bcddfd46-8baf-4119-87d3-46ed764a5faf
AlexandrKhromov2005/EllipticCurves
main.cpp
#include <iostream> #include <string> #include <stdexcept> #include "curve.hpp" int main(int argc, char* argv[]) { if (argc < 4) { std::cerr << "Usage: " << argv[0] << " <a> <b> <p>" << std::endl; std::cerr << "Example: " << argv[0] << " 2 3 97" << std::endl; return 1; } try { ...
ALGO
0.962115
6.52039
76ecca6d-aa7e-4da1-9cec-ff8e95bd2cc0
ishandutta2007/codeforces
flashmt/normal/1443/E.cpp
#include <bits/stdc++.h> using namespace std; const int BOUND = 14; int n, suffix[20], suffixLen; long long fact[20]; void fromIndex(long long index, int p[]) { vector<int> seen(suffixLen, 0); for (int i = 0; i < suffixLen; i++) { int cnt = index / fact[suffixLen - 1 - i]; index %= fact[suffixLen - 1 - ...
ALGO
0.999672
4.127091
0b742c87-b0a8-4cf3-bbad-01b3a143a8ef
AlwaysUnwilling/Linux-
BoostSearch/data/input/boost_1_53_0/libs/utility/shared_iterator_example1.cpp
#include "boost/shared_container_iterator.hpp" #include "boost/shared_ptr.hpp" #include <algorithm> #include <iostream> #include <vector> typedef boost::shared_container_iterator< std::vector<int> > iterator; void set_range(iterator& i, iterator& end) { boost::shared_ptr< std::vector<int> > ints(new std::vector<i...
TOOL
0.945823
3.421442
4a81def8-9c86-4865-8952-96745d652ba8
Sean0628/competitive_programming
atcoder/abc/abc101/b.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i, n) for (int i = 0; i < (n); ++i) #define out(arg) cout << (arg) << endl using ll = long long; using P = pair<int, int>; using mint = modint1000000007; void chmax(ll& a, ll b) { a = max(a, b); } void chmin(ll& a,...
ALGO
0.999968
5.174885
ca97e9e9-6fc1-479a-bc83-b42b97cd6c06
ranjeetsingh99/cpp
Basic_of_input_output/lauch_boxes.cpp
#include<bits/stdc++.h> using namespace std; void print(int a[],int n){ for(int i=0;i<n;i++) cout<<a[i]<<' '; cout<<endl; } int main() { int tc; cin >> tc; while (tc--) { int n , m; cin >> m >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i...
ALGO
0.999952
4.057562
ba351136-c4ac-4e2b-a1ab-d905e4cff612
ilvcr/SourceCode
boost-1.66.0/libs/bimap/example/mi_to_b_path/bidirectional_map.cpp
// Boost.Bimap Example //----------------------------------------------------------------------------- // This example shows how to construct a bidirectional map with // multi_index_container. // By a bidirectional map we mean a container of elements of // std::pair<const FromType,const ToType> such that no two element...
ALGO
0.958541
6.412298
36a48712-48b9-4997-99e1-c8f489068ad0
CN-LEON-DX/DSA1
ArrayBasicMid.cpp/15.FindTownDis.cpp
// Problem // submit // discuss // City X has N towns on the main road. The norm of the towns is a[1],a[2], …, a[N], respectively, these coordinates are distinct, no two coordinates overlap. The city government wants to build a fast BRT line to connect the two closest towns. Try to see how long this route is? And how m...
ALGO
0.999914
4.029534
67ca8c98-879f-4616-8a8c-5b8f9e0efdfa
ayush-kumar774/Competitive-Programming
Codeforces/B. Little Pigs And Wolves (Beta Round #87 Div. 2).cpp
// In the name of Aadi Shakti // We are nothing and you are everything // Jai Mata Di #include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0) ; #define int long long #define endl "\n" void solve() { int n , m , ans = 0; cin >> n >> m; char mat[n + 2][...
ALGO
0.999588
4.186409
85ba7f80-2f0f-49f2-b0cd-c715b2cab599
Randowlh/Project_ACM_2021
code/luogu/p1046.cpp
#include<cstdio> int main(){ int a[10]; int height; int ans=0; for(int i=0;i<10;i++){ scanf("%d",&a[i]); } scanf("%d",&height); height+=30; for(int i=0;i<10;i++){ if(height>=a[i]){ ans++; } } printf("%d\n", ans); return 0; }
ALGO
0.999231
3.374187