uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
848fa340-2c62-4703-80b2-bed88778aed2
raincross7/code-similarity
codes/train_code/problem424/problem424_257.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using vi = vector<int>; int main(){ int n,h,w;cin>>n>>h>>w; int ans = 0; int a,b; rep(i,n){ cin>>a>>b; if(a>=h&&b>=w)ans++; } cout << ans << endl; return 0; }
ALGO
0.999238
3.828364
8147fded-fc2e-4750-97b5-c9a4848f7ff4
DeveshKumar8423/Competitive-Programming
CP/fast_io_endl_mod_alg.cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); //for fast input and output /* 7 disable the synchronisation of C++ streams and C streams By default, C++ streams are synchronized with C streams to ensure that printf and scan...
ALGO
0.999988
5.462384
2b393730-8ae4-4c73-bb01-7a9b54e5f57f
kashish281/GfG-Daily-Practice
Difficulty: Medium/Sum of Subarrays/sum-of-subarrays.cpp
class Solution { public: int subarraySum(vector<int>& arr) { // code here int ans=0; for (int i=0; i< arr.size(); i++){ ans+= ((i+1)* (arr.size()-i)* arr[i]); } return ans; } };
ALGO
0.999943
5.469427
34cb3ae8-f904-4bb6-8d14-9ffe818256b1
R2aper/Labs
Semester 2/Lab6.cpp
/* Вариант - 14 TODO: * Написать программу с рекурсивной функцией для вычисления значения суммы бесконечного ряда cos(x+b) *P.S. eps = 0,5 * 10^-4 */ #include <cmath> #include <iostream> #define M_PI 3.14159265358979323846 using namespace std; int factorial(int n) { if (n == 0 || n == 1) return 1; else...
ALGO
0.999553
4.672614
2b7f85e9-af58-4a20-ae31-709813b5b0bc
riadath/problem-solves
Codeforces/1313C1.cpp
#include <bits/stdc++.h> using namespace std; long long oll = 0; #define ll long long #define ull unsigned long long #define FIO \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define pb push_back #define pii pair<int, int> #define pdd pair<double,double>...
ALGO
0.999993
3.55956
98d25dab-4c44-47c9-af25-77fe2cb4e6ff
Yasirraiyan/Leet-Code-SolvIing-Problem
Leetcode 155 Min Stack/Solution.cpp
class MinStack { public: stack<int>st; MinStack() { } int findmin(vector<int>&v) { int min=v[0]; for(int i=1;i<v.size();i++) { if(v[i]<min) { min=v[i]; } } return min; ...
ALGO
0.999995
5.983197
9f929777-e046-411f-b266-811dafe58319
DoHoangAnh2007/codeforces_master
A-set/1043A.Election.cpp
#define _CRT_SECURE_NO_WARNINGS /***from dust i have come, dust i will be***/ #include<algorithm> #include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #include<functional> #include<iomanip> #include<iostream> #include<map> #include<numeric> #include<queue> #include<set> #include<stack> #include<string...
ALGO
0.999989
3.26098
348855da-eb34-48e5-9572-d70d063e83e4
Arthur-Kitsuragi/Cormen
код/глава 4/4.1.3 second part/main1.cpp
// // Created by Пользователь on 23.08.2022. // #include <iostream> #include <chrono> using namespace std; struct answer { int left; int right; int sum = -9999999; }; answer force_method (int* A, int r, int l) { answer ans; for (int i = r; i <= l; ++i) { int sum = 0; for (int j =...
ALGO
0.999909
5.366662
5fd95dca-5e00-4df1-a797-4f6e1d6f4e68
neka-nat/cupoch
src/tests/test_utility/sort.cpp
#include "tests/test_utility/sort.h" using namespace thrust; // ---------------------------------------------------------------------------- // Greater than or Equal for sorting Eigen::Matrix<T, Dim, 1> elements. // ---------------------------------------------------------------------------- template <typename T, int...
TEST
0.995698
7.35545
1a1b0700-5665-4a0c-bf42-54b7b5f22ec9
gafeol/competitive-programming
Contests/MashUp/2/d.cpp
#include <bits/stdc++.h> using namespace std; char s[3][200005]; int main() { int n; scanf("%d", &n); for (int i = 0; i < 3; i++) { scanf(" %s", s[i]); } for (int i = 0; i < n; i++) { if (s[0][i] != s[1][i] && s[0][i] != s[2][i] && s[1][i] != s[2][i]) printf("%c", s[0][i]); else if (s[0][i] == s[1][i]) pri...
ALGO
0.999974
3.65407
498fc938-329b-43cc-8465-21f913023ce2
m-xin/sln-for-jmp-into-cpp
ch9_randomizing/ch9_prac_prob/ch9_q2_guess_number.cpp
#include <cstdlib> #include <ctime> #include <iostream> #include <cmath> int randRange(int low, int high) { // we get a random number, get it to be between 0 and the number of values in our range, then add the lowest possible value. return rand() % (high - low + 1) + low; // need to add 1 to "high - low", ...
ALGO
0.998133
4.884746
dfe07165-a430-4152-9afc-d77b7f6fa411
1998x-stack/X-LeetCode
C++/2-Medium/00284._窥视迭代器/00284._窥视迭代器.cpp
#include <vector> #include <iostream> using namespace std; class Iterator { struct Data; vector<int> nums; int index = 0; public: Iterator(const vector<int>& nums) : nums(nums) {} Iterator(const Iterator& iter) : nums(iter.nums) {} virtual ~Iterator() {} // Returns the next element in the i...
ALGO
0.9979
5.786366
ca777ae7-6bd4-4ded-a007-966f1151f36e
Spirit599/algorithm
leetcode/cpp/4.cpp
class Solution { public: int findKthSortedArrays(vector<int>& nums1, vector<int>& nums2, int k) { int n1 = nums1.size(); int n2 = nums2.size(); int idx1 = 0; int idx2 = 0; while(1) { if(n1 == idx1) return nums2[idx2 + k - 1]; ...
ALGO
0.999995
5.707599
d574f31e-e11b-47c2-bec0-cfc29365a20b
marcandreB/Question2
Question2_Algo/Question2_Algo/ConsoleApplication7/ConsoleApplication7/jeu.cpp
#pragma once #include "stdafx.h" #include "jeu.h" #include <math.h> #include "tableau.h" std::vector<Monstre> programmationDynamique(const std::vector<Monstre>& monstres, unsigned int magie_rouge, unsigned int magie_bleue) { unsigned int dimensions[2] = { monstres.size(), magie_rouge }; Tableau<std::string> t(std::v...
ALGO
0.992515
3.408463
cc0631f5-e9d5-4ed6-8672-8952cea2dd03
Anshtripathi079/C_Cpp_DSA
binary trees/bfs_level_order_traversal.cpp
class Solution { public: vector<int> levelOrder(TreeNode* root) { vector<int> ans; if(root == NULL) return ans; queue<TreeNode*> q; q.push(root); while(!q.empty()) { TreeNode *temp = q.front(); ...
ALGO
0.999994
5.63817
1323cac9-4c07-4a7e-ba6f-b518223eec80
GaussGreen/old-code
JP/code/prod/libs/hyb3/src/hyb3_evtstat.cpp
#include <hyb3_evtstat.h> #include <cupslib.h> #include <math.h> #include <string.h> #include <assert.h> #define CAPACITY (sizeof(es->sched) / sizeof(es->sched[0])) /*********** Hyb3EvenStatsScheduleInit *****************************/ /* initializes the necessary slices and events */ /...
ALGO
0.99236
6.042123
bce631f3-9990-43f3-97c3-9ef2703460b0
okchavan/GFG_POTD
ModifyLinkedList-1.cpp
class Solution{ public: Node* reverse(Node* node) { Node* prev= NULL; Node* curr = node; while(curr){ Node* next = curr->next; curr->next = prev; prev = curr; curr = next; } return prev; } struct Node* modifyTheList(struc...
ALGO
0.999996
4.929179
f4897964-8c96-4dde-9ee1-4b306f6ce79b
stefdasca/CompetitiveProgramming
Codeforces/CF1082-D12-E.cpp
#include<bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; int n, c; int v[500002], fr[500002], prefc[500002], suffc[500002]; vector<int>nr[500002]; int mmx[500002], wh[500002], mmxs[500002], whs[500002]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> c; int ans =...
ALGO
0.999968
3.540092
7aad64ed-10ca-4b13-8d8e-a7fe0700121b
SUY113/NMTL_HCMUS
NMLT6.cpp
#include <iostream> using namespace std; // bai 1 void NhapMang(int a[], int &n){ for(int i =0; i<n;i++){ cout << "Nhap phan tu thu " << i << " :"; cin >> a[i]; } } void XuatMang(int a[], int n){ for(int i =0; i<n;i++){ cout << a[i] << " "; } } int findX(int a[], int n){ int x; cout << "Nhap x can tim: ";...
TOOL
0.976617
3.327139
df4c98de-371a-4678-be67-ea4805b9ee0b
phongthanh1412/Programming-Technique
onTapCK/BT8.cpp
#include<iostream> #include<fstream> #include<string> using namespace std; struct ns { int ngay = 0; int thang = 0; int nam = 0; }; struct sv { int mssv = 0; string hoVaTen; ns NS; int Toan = 0; int Van = 0; int Anh = 0; int diemTrungBinh = 0; string loaihocluc; }; struct Node { sv sinhVien; Node* next;...
ALGO
0.998206
3.379738
8b837fcf-0571-4beb-9394-792f96a0f0ea
rebirth-core/Rebirth---old
dep/g3dlite/source/GImage_bayer.cpp
/** @file GImage_bayer.cpp @author Morgan McGuire, http://graphics.cs.williams.edu @created 2002-05-27 @edited 2006-05-10 */ #include "G3D/platform.h" #include "G3D/GImage.h" namespace G3D { void GImage::BAYER_G8B8_R8G8_to_Quarter_R8G8B8(int width, int height, const uint8* in, uint8* out) { debugAssert(...
ALGO
0.9308
6.128072
69e4f29d-a230-4dff-967f-7d4a84ea9a7a
dengsitao/algo
test/buy_sell_stock/main.cpp
#include "stdlib.h" #include "stdio.h" #include "time.h" static const int SIZE = 10; static const int MAXRAND = 10; static int ia[SIZE] = {0}; static int input1[SIZE] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; static int input2[SIZE] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; int generateRandInt(int randMax) { return rand() % ra...
ALGO
0.998302
3.858282
51d5cc4c-dfde-4eda-becb-9892f56b28ef
raincross7/code-similarity
codes/train_code/problem498/problem498_137.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const int INF = 1e9; const int MOD = 1e9 + 7; int main(){ int N; cin >> N; vector<int> A(N); vector<int> B(N); ll Asum = 0; ll Bsum = 0; rep(i, N){ cin >> A.at(i); Asum += A.at...
ALGO
0.99998
3.664419
8bf399de-ff93-416d-a690-c231283a7028
Sunasity/Arsenal
src/tt_fc_layer.cpp
#include <stdio.h> #include <iostream> #include <fstream> #include <string> #include "../include/Mat.hpp" #include "../include/tt_fc_layer.hpp" #include "../include/common.hpp" using std::cout; using std::endl; namespace Arsenal{ template <typename Dtype> void tt_fc_layer<Dtype>::TT_layer(Mat<Dtype> &out, Mat<Dtype>...
ALGO
0.960982
3.73789
b74c5e24-08bc-4ca5-90ac-770a2dd1769d
yashsinha1608/DSA
Strings/string5.cpp
#include<iostream> #include<string> #include <vector> #include <algorithm> using namespace std; bool rotation(string s1,string s2){ if(s1.size()!=s2.size()){ return false; } string concat=s1+s1; int ind=concat.find(s2); if(ind==-1){ return false; } return true; } int main()...
ALGO
0.999996
3.619866
ae1a50ae-0b6c-4530-a1c8-7ef6c98ad01b
wormtql/learnopengl-impl
deps/assimp/code/PostProcessing/OptimizeMeshes.cpp
/** @file OptimizeMeshes.cpp * @brief Implementation of the aiProcess_OptimizeMeshes step */ #ifndef ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS #include "OptimizeMeshes.h" #include "ProcessHelper.h" #include <assimp/SceneCombiner.h> #include <assimp/Exceptional.h> using namespace Assimp; static const unsigned int N...
ALGO
0.879529
7.070031
dc381660-f8b1-4a4b-a090-bbf51fcb265a
javier0308/animatedcounter
contador/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998125
6.783439
e9f53a0b-4399-43e1-bb12-ddb9fa842eb0
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_11991_9.cpp
#include <bits/stdc++.h> using namespace std; int f[200005][26], vis[26]; int f2[200005][26], vis2[26]; int l[200005], r[200005]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s, t; cin >> s >> t; for (int i = 0; i < 26; ++i) vis[i] = s.size(); for (int i = s.size() - 1; i >= 0; --...
ALGO
0.999927
4.023188
1c3bae7d-8098-4897-8a52-21dd9e33db16
Mohannadcse/Normalizer-authorship
src/LibToolingAST_Normalizer/transformers/include-sort/IncludeSort.cpp
#include <clang/Tooling/Refactoring.h> #include "IncludeSort.h" /// Preprocessor callback that is called each time an include is encountered. /// /// Collects all includes of a file. void IncludeCollector::InclusionDirective( SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsA...
TOOL
0.965085
7.225231
c42e4ca1-add7-4af1-92a7-cfda90837f50
codeitbijay/Hacktoberfest2k20
C++/CHEFEZQ.cpp
#include<bits/stdc++.h> using namespace std; #define FASTIO ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define FOR(i,a,b) for(int i=a;i<b;i++) #define FORD(i,a,b) for(int i=a;i>=b;i--) #define fill(arr,value) memset(arr,(value),sizeof(arr)) #define pb push_back #define mp make_pair #define all(v) v.begin(),v.end()...
ALGO
0.999935
3.833991
de720c5d-331c-45f7-95e1-80e2c9154c27
Asm0deusss/cpp_basics
tasks/poly/poly.cpp
#include "poly.h" Poly::Poly() { coef_[0] = 0; }; Poly::Poly(const Poly& poly) { coef_ = poly.coef_; } Poly::Poly(const std::vector<int64_t>& vec) { for (size_t i = 0; i < vec.size(); ++i) { if (vec[i] != 0) { coef_[i] = vec[i]; } } } Poly::Poly(const std::vector<std::pai...
ALGO
0.995311
4.642207
5cd7275f-e17f-43a2-b392-fdf446bf20db
JAYVIJAYCHAUHAN/DSA2
Queue/implementation.cpp
#include<iostream> using namespace std; class queue{ public: int*data; int size; int capacity; int nextIndex; int frontIndex; queue(int s){ data = new int[s]; capacity = s; nextIndex = 0; frontIndex = -1; size = 0; } int getS...
ALGO
0.990001
3.677515
823f2712-fe0f-4987-91fb-f1f00fab251b
nmcela/vxgi
lib/imgui/misc/fonts/binary_to_compressed_c.cpp
// dear imgui // (binary_to_compressed_c.cpp) // Helper tool to turn a file into a C array, if you want to embed font data in your source code. // The data is first compressed with stb_compress() to reduce source code size, // then encoded in Base85 to fit in a string so we can fit roughly 4 bytes of compressed data i...
TOOL
0.8937
6.62991
c195390a-cccd-4c6e-8f0a-89a487927b2a
ADAtanasov21/factoriel
factoriel/factoriel.cpp
#include <iostream> using namespace std; class Fact { private: int num; public: Fact(int n) { num = n; } int calcFactoriel() { int factorial = 1; for (int i = 1; i <= num; ++i) { factorial *= i; } return factorial; } }; int ...
ALGO
0.999812
5.890067
02b35cc1-79f3-448f-be74-83b6922a28bf
palilo815/ps
baekjoon/1000/1384.cpp
#include<bits/stdc++.h> using namespace std; #define loop(i,n) for(int i=0;i<n;++i) string name[20]; char msg[20][20]; int main() { cin.tie(NULL), cout.tie(NULL); ios::sync_with_stdio(false); int t = 0; while (++t) { int n; cin >> n; if (!n) break; loop(i, n) { cin...
ALGO
0.999551
4.548469
b1e24317-03b7-44be-aff5-42ec56f7ba85
eugenemavrin/Coursera
WhiteHW/1С/first/src/first.cpp
#define NNMBER 3 #include <iostream> #include <algorithm> #include <vector> #include <string> #include <cctype> #include <map> using namespace std; class Solution { public: Solution() {} Solution(const string& p, const string& b) { _words = Parse(p); _banned = Parse(b); } vector<string> ResVector(); private:...
ALGO
0.999897
5.123526
1d03bb7a-85a2-489d-a6cb-d3c96d782d2a
DasAkash-1/codeforces-solved
2065A-SkibbidusandAmogu.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while (t--) { string s; cin >> s; string t = ""; for (int i = 0; i < s.length() - 2; i++) t += s[i]; cout << t + 'i' << '\n'; } }
ALGO
0.999537
4.15036
e085bad8-80eb-4989-9ea5-6128c751fea9
koichia/flutter_web_file_selector
example/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998848
6.76073
2e1281c9-86c2-4a49-8180-819ce1a3b01f
estehangat/latihan-cplusplus
b6 - Do While Loop/main.cpp
#include <iostream> using namespace std; int main() { int a; cout << "Insert a number between 1-20 : "; cin >> a; // Do While Loop do { cout << "Ronaldo is the GOAT " << a << endl; // Minimal sekali dieksekusi a++; } while (a <= 20); return 0; }
ALGO
0.915303
3.561563
44277bc9-cb1a-4905-9b40-fea26b10cb86
heitorpagotto/lista-pilha-fila-cpp
revisao.cpp
#include <iostream> #include <windows.h> //#region Constants #define MAX_FILA 5 #define MAX_PILE 5 #define MAX_LIST 5 //#endregion Constants //#region GlobalVariables int shouldRun = 1; //#endregion GlobalVariables //#region Structs typedef struct { int key; } REGISTRO; typedef struct { REGISTRO elementos[MA...
TOOL
0.895499
4.3356
f666d417-812f-4a9b-8990-9b4526d5cbb1
Anshullakhera/DSA-CPP
Linked List/Find length of Loop(300425).cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; void loopHere(Node *head, Node *tail, int position) { if (position == 0) return; Node *walk = head; for (int i...
ALGO
0.998929
5.298701
2fd4d601-5d29-4b7c-bd21-61e13187e9d1
n01e0/pRETzel_logic
llvm/examples/Kaleidoscope/Chapter2/toy.cpp
#include <cctype> #include <cstdio> #include <cstdlib> #include <map> #include <memory> #include <string> #include <utility> #include <vector> //===----------------------------------------------------------------------===// // Lexer //===----------------------------------------------------------------------===// // T...
TOOL
0.924074
7.666117
6f7c0eaa-a9a8-4fcd-a855-9374d1eb728c
xairry/PAT-Basic
1039/X1039_1.cpp
#include <iostream> using namespace std; int main() { string a, b; cin >> a >> b; for (int i = 0; i < b.length(); i++) { for (int j = 0; j < a.length(); j++) { if (a[j] == b[i]) { b[i] = '#'; a[j] = '#'; } } } int cnt1 = 0, cnt2...
ALGO
0.999992
3.583134
12e4beba-a90f-469a-8718-306943ea6024
raincross7/code-similarity
codes/train_code/problem253/problem253_391.cpp
#include <bits/stdc++.h> using namespace std; template<typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl using ll = long long; const ll mod = 1e9+7; const int maxn = 1e6 + 5; int n,m,x,y; int a[maxn],b[maxn]; int main() { ios_base::sync_with_stdio(...
ALGO
0.999997
3.252125
4c947869-8ff3-4964-a4ca-8a65f1b01c94
xfstart07/ACM
RQNOJ/恐怖分子_dinic.cpp
#include<iostream> using namespace std; int n,G[55][55],u[55][55]; int dis[55]; int pre[55]; bool vis[55]; int MAX,ans,N; void bfs(){ int que[55],h,t; memset(vis,0,sizeof(vis)); memset(dis,-1,sizeof(dis)); que[1]=1; h=t=1; dis[1]=1; vis[1]=1; while(h<=t){ int cur=que[h++]; ...
ALGO
0.999683
3.27298
a8e81a0a-f943-4ef2-9d58-e6720fb9aedb
Romit-Maulik/Practice
CPP_Tutorials/Pybind_Demo/EIGEN-3.3.7/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Eigen::MatrixXf m(2,4); Eigen::VectorXf v(2); m << 1, 23, 6, 9, 3, 11, 7, 2; v << 2, 3; MatrixXf::Index index; // find nearest neighbour (m.colwise() - v).colwise().squaredNorm()...
ALGO
0.999958
4.138078
b2d6bb7b-29f4-4b89-a581-cca99b826078
priyanshgupta0/CODE-CPP
Array+ForLoop.cpp
#include<iostream> using namespace std; int main(int argc, char const *argv[]) { int x[] = {0,1,2,3,4,5,6,7,8,9}; for (int i = 0; i < 10; i++) { cout<<x[i]<<endl; } return 0; }
TOOL
0.971569
3.422826
64069e2f-dcd4-492d-b6e6-46ec84666554
Agent-Orange9two5/LP1-AIA-1
Grupa 2/Chitu_Gabriela_GR2/Teme/problema1.cpp
#include <iostream> #include <fstream> using namespace std; // ifstream f("SumaPare.txt"); ofstream g("SumaPare.txt"); int main () { int v[100],i,s=0,n; cin>>n; for(i=0;i<n;i++) { cin>>v[i]; } for(i=0;i<n;i++) { if(v[i]%2==0) s+=v[i]; } g<<s; return 0...
ALGO
0.999902
3.982843
376be76e-a47f-4f96-91dd-d3de5a0d8efd
rylahs/Study_Previous
CPP,CodingTest/Post-Baaarking/0x02. Basic Code Write #02/BaaarkingDog/0x02/solutions/2446.cpp
// Authored by : wogha95 // Co-authored by : - // http://boj.kr/7026df35c02346969ab865fd2c15ad16 #include <bits/stdc++.h> using namespace std; int main(void) { ios::sync_with_stdio(0); cin.tie(0); int N; cin >> N; for(int i = 0; i < N - 1; i++) { for(int j = 0; j < i; j++) cout << ' '; for(int j = ...
ALGO
0.999982
3.868469
99a38cf6-596a-4c37-acbe-f4d36d5ce6b9
xxEBxx/CP
Book/DP/DAG/project scheduling 452.cpp
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define f first #define s second using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef pair<ll, ll> pl; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; const int maxn = ...
ALGO
0.999721
3.911995
3eaf1c24-e566-4890-a7c9-be1a73dcbf15
siddharth12s/LeetCode-
Distance of nearest cell having 1 - GFG/distance-of-nearest-cell-having-1.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find distance of nearest 1 in the grid for each cell. vector<vector<int>>nearest(vector<vector<int>>grid) { // Code here int m =grid.size(); int n=grid[0].size(); ...
ALGO
0.999966
6.2916
d9fecc69-ee8a-4fd6-ae6d-73b27c4227ac
ishandutta2007/codeforces
nathanajah/normal/187/A.cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> #include <math.h> #include <string> #include <string.h> #include <vector> #include <algorithm> using namespace std; int n; int i,j; int a[300000]; int b[300000]; int balik[300000]; int res; int main() { scanf("%d",&n); for (i=0;i<n;++i) scanf(...
ALGO
0.999933
3.085382
efd22a7a-7fd3-400d-84ca-b8e4f20eb710
bookgvi/AlgosC
Sort/Select.cpp
#include <bits/stdc++.h> #include "RCG.cpp" using namespace std; typedef vector<int> vi; class Select { private: static vi sort(vi arr) { for (int i = 0, len = (int) arr.size(); i < len; i += 1) for (int j = i + 1; j < len; j += 1) if (arr[i] - arr[j] > 0) swap(arr[i], arr[j]);...
ALGO
0.998167
4.75426
d58b0d87-ce2b-4e86-8a9a-16972d99f664
hackerkid/LightOJ-Solutions
1053-Higher-Math.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stdio.h> using namespace std; int main() { int t; cin >> t; for (int cs = 1; cs <= t; cs++) { vector <long long int> a(4); cin >> a[0]; cin >> a[1]; cin >> a[2]; sort(a.begin(), a.begin() + 3); if((a[0] * a[0] + a[1] * a[1]) == (...
ALGO
0.999667
4.135595
2bed26b9-12ea-42a4-857f-bf26e806f445
tzupengwang/PECaveros
contest/opencup/XVIII/Eastern/a.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long long LL; //#define int long long #define LEN (5 * (1 << 20)) #define N 202020 #define L(X) (X<<1) #define R(X) (1+(X<<1)) #define mid ((l+r)>>1) struct Upper{ int vl[ N ]; void build(){ for( int i = 0 ; i < N ; i ++ ) vl...
ALGO
0.998102
3.741687
9c2635da-2074-4f6d-ad98-e3aca7792cc9
aadarsh231099/CodeChef
Starters 59/Chef and Happy String.cpp
//https://www.codechef.com/problems/HAPPYSTR //Chef and Happy String #include <bits/stdc++.h> using namespace std; bool isvowel(char t) { if(t=='a'||t=='e'||t=='i'||t=='o'||t=='u')return true; else return false; } void solve(){ string s; int c=0; cin>>s; for(int i=2;i<s.length();i++) { ...
ALGO
0.999836
4.434906
d04e9ce6-639a-4f83-a049-5d2f6eee7ebd
iuiuiom/hhvm
third-party/folly/src/folly/stats/detail/DoubleRadixSort.cpp
#include <folly/stats/detail/DoubleRadixSort.h> #include <algorithm> #include <cstring> namespace folly { namespace detail { // Convert floats to something comparable via radix sort. // See http://stereopsis.com/radix.html for details. static uint8_t getRadixBucket(double* f, uint8_t shift) { uint64_t val; memcp...
ALGO
0.9974
7.089055
33900939-824e-428b-9839-bb3f4beb67f1
CodeWithIsmail/NeetCode-150
Linked List/Reverse Linked List.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) {} * }; */ class Solution { public: ListNode *reverseLis...
ALGO
0.999855
5.720243
52ddf915-ecb8-417f-97c1-049813909155
Rahulgoy/leetcode
98-validate-binary-search-tree/98-validate-binary-search-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999578
6.307739
23f3fcb7-a4da-4776-b2a0-49de578149b9
yangtengleo/DeepSPIN
lammps_DeepSPIN/src/MANYBODY/pair_tersoff_zbl.cpp
// clang-format off /* ---------------------------------------------------------------------- Contributing author: Aidan Thompson (SNL) - original Tersoff implementation David Farrell (NWU) - ZBL addition ------------------------------------------------------------------------- */ #include ...
ALGO
0.987671
7.513335
7bec6210-cf04-4768-b4e9-fe9be3ff10f9
J-Gann/alltrans
benchmarks/benchmarks_source/8_level/p02256/s336401589.cpp
#include <iostream> using namespace std; int gcd(int x, int y) { if (x < y) { return gcd(y, x); } else if (x >= y && y!=0) { return gcd(y, x % y); } else { return x; } } int main() { int x, y; cin >> x >> y; cout << gcd(x, y) << endl; return 0; }
ALGO
0.999812
5.178517
a0059d9a-eb31-4093-b101-f672acd36864
amsraman/Competitive_Programming
15-295/S22/Contest 07/A.cpp
#include <bits/stdc++.h> using namespace std; int n, co[26]; string st[100]; int main() { cin >> n; for(int i = 0; i < n; i++) { cin >> st[i]; ++co[st[i][0] - 'a']; } int ans = 0; for(int i = 0; i < 26; i++) { int g1 = (co[i] / 2), g2 = (co[i] + 1) / 2; ans += g1 *...
ALGO
0.999933
4.262873
9d211a10-d884-4361-a797-096ef1b9ce27
syha6821/advent-of-code
2022/11/trashes/test.cpp
#include "std_lib_facilities.h" #include <queue> const int OLD = -1; function<int(int)> calc(char ch,int right) { if(right == OLD) { switch (ch) { case '+': return [](int old) { return old + old; }; case '-': return [](int old) { return old - old; }; case '*': re...
ALGO
0.999758
4.758103
37e9295f-5757-4c1d-aa8b-ec714be2e4cb
runtime-terror-63/LEET_HUB
1396-count-servers-that-communicate/count-servers-that-communicate.cpp
class Solution { public: int countServers(vector<vector<int>>& grid) { int n = grid.size(); int m = grid[0].size(); vector<int>rowCnt(n, 0); vector<int>colCnt(m, 0); for(int i=0; i<n; i++){ for(int j=0; j<m; j++){ if(grid[i][j]==1){ ...
ALGO
0.999807
6.414569
b3469386-1edc-4885-8fc8-b74ba528840c
kunal23kmr/Codes
5th_SEM/OS_lab/files/sjf.cpp
#include <bits/stdc++.h> using namespace std; int calculate(vector<vector<int>> &ref, int n) { float turn_around_time = 0, weighted_turn_around_time = 0; int current_time = 0; for (int i = 0; i < n; i++) { int min_burst_time = INT_MAX; int selected_process = -1; for (int j = 0; j...
ALGO
0.999978
4.841265
bf0c99f9-2dfe-4bb0-b3f3-f774ed8ecf57
thakurramanji/Coding_Ninjas-Data-Structure-and-Algorithms
1.Condition_and_Loops/fahrenheit_to_celsius_table.cpp
#include<iostream> using namespace std; int main(){ int st,en,gap; cin>>st>>en>>gap; while(st<=en) { int cel = (st-32)*5/9 ; cout<<st<<" "<<cel<<endl; st+= gap; } }
ALGO
0.997903
3.154712
4495b96d-45f0-4afc-a5a4-077a51aeb1cc
hna006/hoang_ngoc_anh_jpanks24a_laptrinhc_ss2
SS4coban4.cpp
#include <stdio.h> int main() { int month; printf("hay nhap so thang (1-12): "); scanf("%d", &month); switch(month) { case 1: // Thng 1 c 31 ngy case 3: // Thng 3 c 31 ngy case 5: // Thng 5 c 31 ngy case 7: // Thng 7 c 31 ngy case 8: // Thng 8 c 31 ngy cas...
ALGO
0.991275
3.743283
e00b3d3e-e1bb-4250-8d16-782b99aaa9e0
rix161/Data-Driven-Mesh-Segmentation-and-Labelling
TestCGAL/Test/Test/Edge_Dijkstra.cpp
#include "Edge_Dijkstra.h" #include "Off_Writer.h" #include <boost/algorithm/string.hpp> void setupColorBins(std::vector<std::vector<int>> &colorBins) { for (int i = 0; i < colorBins.size(); i++) { std::vector<int> color(4); color[0] = rand() % 255; color[1] = rand() % 255; color[2] = rand() % 255; color[3...
ALGO
0.968161
4.792873
037f6ed4-6330-407d-b882-aee0fb05d3b8
RamazanFIT/PP1_LABS_QUIZ_FINAL
9lab/N.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int>d(n); vector<bool>in(1000000000, false); for(int i=0; i<n; i++){cin>>d[i]; in[d[i]]=true;} int res=0; for(int i=0; i<n; i++){ for(int j=i+1; j<n; j++){ if(in[d[i]^d[j]]){ res+...
ALGO
0.999944
4.431923
160bbc47-1555-4788-80fe-2bfa9cd893e9
Chintan-Patel-Games/Outscal_Assignment
Programs/02. OOPS Assignment/05. Initialization with Constructors/Assignment_05.cpp
#include <iostream> using namespace std; class Player { private: int health; int lives; public: Player(int _health, int _lives) { health = _health; lives = _lives; cout << "I am a player, I just got spawned!" << endl; cout << "Player Health : " << health << endl; ...
TOOL
0.855273
4.89769
5e38b0d3-2dff-452b-acbf-6452c5e2700c
mvancompernolle/ai_project
data/example-EllipticFunction.cpp
using namespace System; using namespace NETGeographicLib; int main(array<System::String ^> ^/*args*/) { try { EllipticFunction^ ell = gcnew EllipticFunction(0.1, 1.0); // parameter m = 0.1 // See Abramowitz and Stegun, table 17.1 Console::WriteLine( String::Format( "{0} {1}", ell->K(), ell...
ALGO
0.998696
4.937266
1d6d805b-eb75-4018-a4a4-ecf8c4c9300a
kmjp/procon
atcoder/abc151-200/abc168/b.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999105
3.458175
5f79c7cf-8c8c-4e28-a77c-fc9f21f77a53
Ayu727575/recursion_10_days_challenge
binary_string_with_no_consecutive_1s.cpp
void solve(vector<string> &vec, int pos, int k, string s){ if(pos == k){ vec.push_back(s); return; } if(pos==0){ solve(vec, pos+1, k, s+"0"); solve(vec, pos+1, k, s+"1"); } else{ solve(vec, pos+1, k, s+"0"); if(s.back()=='0'){ solve(vec, po...
ALGO
0.999984
6.219075
707174ae-7baf-4081-8ccd-94279be1d202
arm/arm-toolchain
libc/src/math/generic/fromfp.cpp
#include "src/math/fromfp.h" #include "src/__support/FPUtil/NearestIntegerOperations.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(double, fromfp, (double x, int rnd, unsigned int width)) { return fputil::fromfp</*IsSigned=*/true>(x,...
TOOL
0.923503
5.975262
33fb47f8-b50c-4ccc-b714-6fc026907ba8
Pabfigueira/Maratona
Codeforces/Seletiva_UFMG_2017_C.cpp
#include <bits/stdc++.h> using namespace std; #define sc(a) scanf("%d", &a) #define sc2(a, b) scanf("%d%d", &a, &b) #define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define scs(a) scanf("%s", a) #define pri(x) printf("%d\n", x) #define prie(x) printf("%d ", x) #define mp make_pair #define pb push_back #define BUFF io...
ALGO
0.999992
3.395126
a2ae05f0-d3c9-4e34-b292-a3d18e760451
koppy364/StudySpace
CodeUpBasic/BasicProblems/1082.cpp
#include <stdio.h> int main() { int n; scanf("%X", &n); for (int i = 1; i < 16; i++) { printf("%X*%X=%X\n", n, i, n*i); } }
ALGO
0.995145
3.07495
3e8f3c47-873c-499f-9b05-71d1e44ee428
Lord-Lava/Codechef-Contests
53 SnackDown 2021 - Elimination Parallel (Rated for Div 2)/Remove_Element.cpp
#include <bits/stdc++.h> using namespace std; #define boost ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define int long long const int mod = 1e9 + 7; #define f(i,n) for(int i=0;i<n;i++) #define rep(i,s,n) for(int i=s;i<n;i++) #define fm(it,mp) for(auto it=mp.begin();it!=mp.end();it++) #define pb...
ALGO
0.999117
4.113371
fe908af0-3594-4a75-be31-b12326854bfa
Arielce/dio
contracts/libc++/upstream/test/std/containers/sequences/forwardlist/forwardlist.ops/remove_if.pass.cpp
// <forward_list> // template <class Predicate> void remove_if(Predicate pred); #include <forward_list> #include <iterator> #include <cassert> #include <cstddef> #include "min_allocator.h" #include "counting_predicates.hpp" bool g(int i) { return i < 3; } int main() { { typedef int T; typed...
TEST
0.883896
6.508732
ab876949-9bde-4991-b14b-54bd73875fcc
Waterjin6/LeetCode
0108-convert-sorted-array-to-binary-search-tree/0108-convert-sorted-array-to-binary-search-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999994
6.867146
2a75b5e5-5aa0-41de-99f3-c1c4b6ff32a1
aoaforever/C_trian
Leetcode/list/23_mergeKLists.cpp
#include <queue> using namespace std; 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) {} }; //使用优先队列存储K个链表,在一一弹出 class Solution { private: struct cmp{ bool ...
ALGO
0.99988
5.222219
7616a4ab-e3c8-4d89-8369-57e9eeba3f39
Pratsbas123/Algorithms-and-Data-Structures
Graphs/GraphRepDFS.cpp
//Unweighted and Undirected Graph DFS #include<bits/stdc++.h> using namespace std; int addEdge(vector<int> graph[],int u,int v) { graph[u].push_back(v); graph[v].push_back(u); } void DFSUtil(int u, vector<int> adj[], vector<bool> &visited) { visited[u] = true; cout << u << " "; for (int i=0; i<adj...
ALGO
0.999967
5.358388
67e541d8-5ce7-46c9-a666-9353d2903d0f
stdstring/leetcode
Algorithms/Tasks.0001.0500/0224.BasicCalculator/solution.cpp
#include <string> #include "gtest/gtest.h" namespace { enum Operator { NONE, ADD, SUB }; class Solution { public: int calculate(std::string const &source) const { size_t pos = 0; return static_cast<int>(processExpression(source, pos)); } private: long long processExpression(std:...
ALGO
0.997548
6.394847
7113f16c-8823-4a2e-8e6a-64950d445a17
kamleshjoshi8102/Codeforces_Practice
CF_Practice/1343_A_ candies.cpp
#include <iostream> #include<math.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n,k; cin>>n; int sum=3; for(k=2;(n%sum!=0);k++) { sum=sum+pow(2,k); } cout<<n/sum<<endl; } }
ALGO
0.999804
3.804513
7f9dcc46-e6ac-4d11-a34d-567677ad40c9
PSesharao/sde_preparation
DSA/Recursion/90. Subsets II.cpp
/* https://leetcode.com/problems/subsets-ii/ Time Complexity: O(2^n) for generating every subset and O(k) to insert every subset in another data structure if the average length of every subset is k. Overall O(k * 2^n). Space Complexity: O(2^n * k) to store every subset of average length k. Auxiliary space is O(n)...
ALGO
0.999834
5.35399
9cb927d0-a59d-4fa3-abf0-b53fec2d724a
galin-kostadinov/Software-Engineering
C++/Programming Basics with C++/11. Exercise - For-loop/simple_tasks/HalfSumElement.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int n; cin >> n; int sum = 0; int maxNum = 0; for (int i = 0; i < n; i++) { int num; cin >> num; sum += num; if (maxNum < num) { maxNum = num; } } if (sum - maxNum ...
ALGO
0.999978
4.403413
076feef9-b154-45e3-862f-10506c0b9027
ravip98670/Leet_Code_Problems
Count_Vowel_Strings_in_Ranges.cpp
class Solution { public: bool checkVol(char c) { return (c == 'a') || (c == 'e') ||(c == 'i') ||(c == 'o') ||(c == 'u'); } vector<int> vowelStrings(vector<string>& words, vector<vector<int>>& queries) { vector<int>temp; for(int i=0;i<words.size();i++){ if(checkVol(words[i][...
ALGO
0.999796
6.392242
0a9b0993-f31b-496b-9a3a-b5060a173579
AFpine/Problem-Solving
BOJ/10000-14999/13325.cpp
#include <bits/stdc++.h> using namespace std; #define sz(a) (int)(a.size()) #define all(a) (a).begin(), (a).end() typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<long long, long long> pll; typedef pair<long double, long double> pdd; typedef complex<double> cplx; const double PI ...
ALGO
0.999686
3.678782
35369328-3825-40b5-b59a-49931dbf5546
vallarasuk/LeetCode
solutions/2241. Design an ATM Machine/2241.cpp
class ATM { public: ATM() : bank(5) {} void deposit(vector<int> banknotesCount) { for (int i = 0; i < 5; ++i) bank[i] += banknotesCount[i]; } vector<int> withdraw(int amount) { vector<int> withdrew(5); for (int i = 4; i >= 0; --i) { withdrew[i] = min(bank[i], static_cast<long>(amount...
ALGO
0.993867
5.172937
8be9c0d5-fdd3-4704-827e-971d70fdbd49
darrentimotius/algoProg
UTS/B.cpp
#include <stdio.h> #include <string.h> int main() { int T; scanf("%d", &T); for (int tc = 1; tc <= T; tc++) { char H[1005], E[1005]; scanf("%s %s", H, E); int lengthH = strlen(H), lengthE = strlen(E); int count = 0; if (lengthE == 1) { for (int...
ALGO
0.999843
3.902591
29f1867d-b521-41b8-8653-ebb7d04bee11
Matheny12/Word-Guess
guess.cpp
#include "guess.h" #include "player1.h" #include "player2.h" #include <iostream> #include <string> using namespace std; void guess::playGame(player1& p1, player2& p2) { bool correct = false; size_t guessAmount = p1.word.length(); cout << p2.name << ", you will now try to guess " << p1.name << "'s word (ALL CAPS). ...
TOOL
0.87141
4.071671
702efbf5-2b1a-43af-92a3-015d7698172e
ishandutta2007/codeforces
joyfun/normal/377/C.cpp
#include <stdio.h> #include <string.h> #include <algorithm> #define min(a,b) (a)<(b)?(a):(b) #define max(a,b) (a)>(b)?(a):(b) using namespace std; const int INF = 0x3f3f3f3f; const int MAXN = 1111111; const int N = 105; const int M = 25; int cmp(int a, int b) { return a > b; } int n, m, s[N], c[M], t[M], dp[MAXN...
ALGO
0.999846
3.36703
e3d3e46d-f195-4529-aaf5-258eac74c087
Imanity/LeetCode
31-40/34 Search for a Range/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int l = 0, r = nums.size() - 1, mid = -1; vector<int> res; if(l > r || nums[l] > target || nums[r] < target) { res.push_back(-1); ...
ALGO
0.99994
5.797195
a1586d6e-67d8-4b95-949b-e7081f167162
KimDongHyun1/Algorithm
트리의 순회.cpp
#include <iostream> #include <vector> using namespace std; int in[100001]; int post[100001]; int position[100001]; int n, root; void pre(int is, int ie, int ps, int pe) { if (is > ie) return; root = post[pe]; cout << root << ' '; int p = position[root]; int left = p - is; pre(is, p - 1, ps, ps + left - 1); pr...
ALGO
0.999974
4.100587
2b0e7d54-8aa4-4eee-a605-d04bb2f76b70
ranamuhammadsarfraz/cpp
reference.cpp
//reference is a variable that assign a variable the value of another variable. //you can assign it by adding & operator before a variable name. //writing it in cout you can get memory address. #include <iostream> using namespace std; int main(){ string name = "Rana Muhammad Sarfraz.\n"; string &main = name; ...
TOOL
0.896611
3.243161
aad66e90-ff67-4dfa-a598-09cb3862185c
giangthewalkingman/programming_language
Cpp/KTLT/onthi_GK/test.cpp
#include <iostream> using namespace std; int main() { int x; x = 0x55; const int n = 4; for(int i = 0; i < n; i ++) { cout << (x&1)?'o':'-'; } }
ALGO
0.993881
3.298267
d83430b5-a42a-4b2a-ac34-4ef1e0f254f2
mezhdelova/Essentials
Chapter5/5.3.13(8).cpp
#include <iostream> using namespace std; class Node { public: Node(int val); ~Node(); int value; Node* prev; Node* next; }; Node::Node(int val) : value(val), next(nullptr), prev(nullptr) {} Node::~Node() {} class List { public: List(); ~List(); List(List &other); void push_front(int value); bool pop_fro...
ALGO
0.961291
4.39877
7d0f5d33-85bd-4f2b-b870-714ff851f1a6
ishandutta2007/codeforces
joeywheeler/normal/334/B.cpp
#include <cstdio> #include <algorithm> #ifdef DEBUG #define D(x...) fprintf(stderr, x) #else #define D(x...) #endif #define FO(i,a,b) for (int i = (a); i < (b); i++) using namespace std; int x[8], y[8]; int nx[8], ny[8]; int main() { FO(i,0,8) scanf("%d %d", x+i, y+i); FO(i,0,8) nx[i] = x[i], ny[i] = y[i];...
ALGO
0.999631
3.528908
5c97e7f4-39a6-442e-b73e-f520676bc727
Pulakesh5/_DSA_
MAY 24/10 May/786. K-th Smallest Prime Fraction LC.cpp
class Solution { public: vector<int> kthSmallestPrimeFraction(vector<int>& arr, int k) { vector<pair<double,pair<int,int>>> vp; int len = arr.size(); double fraction; for(int p1=0; p1<len; p1++) { for(int p2=p1+1; p2<len; p2++) { if(arr...
ALGO
0.999659
5.15868
a8a88603-1d81-446f-a73f-b038d6022f39
nnminh-sam/Problem-List
CSES/sorting-and-searching/concert-tickets/solution.cpp
#include <bits/stdc++.h> #define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL); using namespace std; int main() { FASTIO; #ifndef ONLINE_JUDGE freopen("data.txt", "r", stdin); #endif int n, m; cin >> n >> m; int* a = new int [n]; int* b = new int [m]; for (int i = 0;...
ALGO
0.999995
3.550388
5dfb19f6-75c8-4c6b-bc2f-561c0cddda1d
nguyentuss/Competitive-Programming
CP/Code linh tinh/diem.cpp
#include <iostream> using namespace std; int diem; int main(){ cin >> diem; if (diem >=8) { cout << "Loai Gioi"; } else if (diem >=7) { cout << "Loai Kha"; } else if (diem >=5) { cout << "Loai Trung Binh"; } else if (diem >=4) { cout << "Loai Yeu"; } else cout << "Loai Kem "; return 0; }
ALGO
0.993367
3.243266