uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
3776f265-5315-4ffb-94ba-ac039de86732
mihaimoga/XMLSitemap
boost/libs/atomic/src/find_address_sse41.cpp
/*! * \file find_address_sse41.cpp * * This file contains SSE4.1 implementation of the \c find_address algorithm */ #include <boost/predef/architecture/x86.h> #include <boost/atomic/detail/int_sizes.hpp> #if BOOST_ARCH_X86 && defined(BOOST_ATOMIC_DETAIL_SIZEOF_POINTER) && (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER == ...
ALGO
0.985693
6.248289
6aeb9f9a-a2d1-4049-96fc-cc589d69b23b
fengsichuang/Leetcode
Leetcode206.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* reverseList(ListNode* head) { i...
ALGO
0.999904
5.686886
4086c64a-1ab8-4894-beaa-e11019dfc73b
ashishkori/Leetcode
45-jump-game-ii/jump-game-ii.cpp
class Solution { public: int jump(vector<int>& nums) { int farthest =0, curr = 0, jump =0; for (int i=0;i<nums.size()-1;i++) { farthest = max(farthest,nums[i]+i); if(i==curr) { curr = farthest; jump++; } } return jump; } };
ALGO
0.999983
6.065147
795fc97b-a5cc-4b6a-b168-14d8b51be8ec
vuba2002/Code_C
05-23-So-xuat-hien-max.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ int t ; cin >> t ; while(t--){ int n ; cin >> n ; int a[n]; map<int, int> mp; for(int i = 0 ; i < n ; i ++){ cin >> a[i]; mp[a[i]]++; } int dem = INT_MIN; ...
ALGO
0.99998
3.69784
51ea3e0b-52b7-4110-b9a3-8f2c95386b53
NickRaise/DSA-Striver-SDE-Sheet
Dynamic_Programming/2D,3D_DP_and_DP_on_Grids/06_Minimum_Falling_Path_Sum.cpp
#include <bits/stdc++.h> using namespace std; int minFallingPathSum(vector<vector<int>>& matrix) { int n = matrix.size(); if (n == 0) return 0; int m = matrix[0].size(); if (m == 0) return 0; vector<int> dp(m, INT_MAX); // Initialize dp for the last row (base case) for(int j = 0; j < m;...
ALGO
0.999999
7.408336
8b5c0c99-d3ad-4a77-8b56-b59997abeef1
anuragshirolkar/OS-labs
lab02/answer.cpp
#include <string.h> #include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <iomanip> #include <string> #include <set> #include <unistd.h> #include <map> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <signal.h> #includ...
TOOL
0.940867
3.88394
1c1e435b-b298-435c-8505-2389eef2f7fa
ishandutta2007/codeforces
andreasyan/normal/1594/E1.cpp
#include <bits/stdc++.h> using namespace std; #define m_p make_pair #define all(x) (x).begin(),(x).end() #define sz(x) ((int)(x).size()) #define fi first #define se second typedef long long ll; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); mt19937 rnf(2106); const int M = 1000000007; int ast(int...
ALGO
0.999967
4.106699
f0cf6fed-d7bd-46ec-aa78-0dd6d711ef86
sousarbarb/pdeec-mr
src/5dpo_msl_firmware/src/robotMotion.cpp
#include "robotMotion.h" void NonLinearHammersteinBlock(float &vmot){ if (vmot > MOT_HAMM_VD){ vmot = (vmot - MOT_HAMM_VD) + MOT_HAMM_V0; } else if (vmot > -MOT_HAMM_VD){ if (MOT_HAMM_VD != 0) vmot = vmot * MOT_HAMM_V0 / MOT_HAMM_VD; else vmot = 0; } else { vmot = (vmot + MOT...
TOOL
0.988476
5.2453
50a661cf-89ff-4e2d-b538-341951fdb8d2
Soloturkh/opencv
modules/dnn/src/layers/gemm_layer.cpp
#include "../precomp.hpp" #include "layers_common.hpp" // backends #include "../op_cuda.hpp" #ifdef HAVE_CUDA // #include "../cuda4dnn/primitives/matmul.hpp" #include "../cuda4dnn/primitives/inner_product.hpp" using namespace cv::dnn::cuda4dnn; #endif #include "../op_cann.hpp" #include "../ie_ngraph.hpp" #include "../o...
ALGO
0.850659
7.619452
e7284a79-746b-48d2-8970-96abe473303e
ahmeddesokyebrahim/Vehicle-Steering-Control-using-MPC
src/Eigen-3.3/unsupported/doc/examples/MatrixSine.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { MatrixXd A = MatrixXd::Random(3,3); std::cout << "A = \n" << A << "\n\n"; MatrixXd sinA = A.sin(); std::cout << "sin(A) = \n" << sinA << "\n\n"; MatrixXd cosA = A.cos(); std::cout << "cos(A) = \n" << cos...
ALGO
0.949603
5.878768
d524f2ee-1eff-4db7-ba8b-70b6a6470423
iamslash/learntocode
leetcode/HouseRobber/20201023.a.cpp
#include <cstdio> #include <vector> #include <algorithm> // i // num : 1 2 3 1 // // tmp : 1 2 4 4 // pre : 0 1 2 4 // cur : 1 2 4 4 class Solution { public: int rob(const std::vector<int>& V) { int pre = 0, cur = 0, tmp = 0; for (int i = 0; i < V.size(); ++i) { // max of // not p...
ALGO
0.999909
5.012282
f9135bc2-a300-4c40-9896-6f48d632397d
nqdat2002/C_Plus_Plus
Mycode/phep toan voi phan so.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; struct PhanSo { ll tu, mau; }; void process(PhanSo a, PhanSo b) { ll x = a.tu; ll y = b.tu; ll z = a.mau; ll t = b.mau; ll tmp = (b.mau * a.mau )/ __gcd(b.mau, a.mau); a.tu = a.tu * tmp / a.mau; b.tu = b.tu * tmp / b.mau; PhanSo res; ll...
ALGO
0.999827
5.509766
08d49d59-d828-4fc9-b972-1cc8ca86754f
alexandraback/datacollection
solutions_5634947029139456_1/C++/Henry2012/1.cpp
#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <algorithm> #include <string> #include <vector> using namespace std; int minStep = 1000000; bool dfs2(vector<string> & flow, vector<string> & dev, int l, int pos = 0, int changed = 0) { if (changed > minStep) return false; if (...
ALGO
0.999936
3.779836
2dc36b50-95f5-4d2e-bcc3-c66aa79fbfa9
VladiHack/Cpp
C++/sums2012.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; long long int result=0; void FindPaths(int currentSum,bool foundSums[],int arr[],int left,int right,int n); int main(int argc, char *argv[]) { int n; int left; int right; cin>>n; cin>>left; cin>>right; int arr[n]; for(int i=0;i<n;i++)...
ALGO
0.999798
3.111474
7a8f1ea9-7af0-43f2-8d55-01fadc506a84
muradhaji/ProblemSolutions
Codeforces/cpp/1A.cpp
//Link: https://codeforces.com/problemset/problem/1/A #include <bits/stdc++.h> using namespace std; int main() { long long n, m, a, x = 1, y = 1; cin >> n >> m >> a; if(n > a) { if(n % a == 0) x = n / a; else x = (n / a) + 1; } if(m > a) { if(m % a == 0) y = m / a; else y = (m / a) + 1; } cout << x * y...
ALGO
0.9999
3.795166
1c349938-e4fc-4734-bb7e-d836ea44c806
Ataru2002/ICPC-Competitive-Programming
HouseNumbers.cpp
//Link to Problem: https://www.acmicpc.net/problem/16691 /** Hanabi? ** . ** .' ** .' ** /`-._' ** / / ** / / ** / / ** ...
ALGO
0.999991
3.261343
90241c21-725a-4a03-ab39-6f4b725016da
vfolunin/archives-solutions
LeetCode/1591.cpp
class Solution { void dfs(vector<vector<int>> &graph, int v, vector<int> &visited, bool &hasCycle) { visited[v] = 1; for (int to : graph[v]) { if (visited[to] == 0) dfs(graph, to, visited, hasCycle); else if (visited[to] == 1) hasCycle = 1; ...
ALGO
0.999444
5.313906
47290a2c-4e28-456e-ad6e-f0fc0c6c0a98
Habib599/Data-Structures
12 module mid exam/all singly lin list.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; void insert_at_tail(Node *&head, int v) { Node *newNode = new Node(v); if (head == NULL) { head = newNode; retu...
ALGO
0.999881
4.844259
331db888-0d99-44df-ac80-f953f6c0d8aa
doorcs/Algorithm
BOJ/05347.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; ll gcd(ll a, ll b) { // 사실 C++17부터 std::lcm(), std::gcd()가 있지만.. if (b == 0) return a; return gcd(b, a%b); } int main() { cin.tie(nullptr); cout.tie(nullptr); ios_base::sync_with_stdio(false); int n; cin >> n; while (n--) { ll a, ...
ALGO
0.999947
6.086162
3db40bd2-25e3-40c3-b0dd-0c7b7bcdb40d
matrixx-beta/android_frameworks_av
media/libeffects/lvm/lib/Common/src/LVC_MixSoft_1St_2i_D16C31_SAT.cpp
/********************************************************************************** INCLUDE FILES ***********************************************************************************/ #include <system/audio.h> #include "LVC_Mixer_Private.h" #include "VectorArithmetic.h" #include "ScalarArithmetic.h" /*************...
ALGO
0.990218
6.278666
46d1b64b-e3a5-45e6-84f6-4434efc22adc
Jaydiii52/Pt
pk2.cpp
//Rasya Rahmat Syaban_F55123041 #include <iostream> using namespace std; void bubblesort(int arr[], int n) { for (int i=0; i < (n-1) ; i++) { for (int j=0; j < (n-1); j++){ if(arr[j] > arr[j+1]){ int temp = arr[j]; arr[j] = arr[j+1]; ...
ALGO
0.999944
4.374704
afe51a8e-253a-4f3e-bbe3-9d94041bd920
codingashishdev/DSA.CP
Competitive programming/Contests/AtCoder/Contest 1/A_Filter.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; while (n--) { int x; cin >> x; if (x % 2 == 0) { cout << x << " "; } } }
ALGO
0.99936
4.362136
ad13a013-60ac-40de-879a-6996ca2e1d16
opensatelliteproject/xritlib
src/Tools.cpp
#include "Tools.h" using namespace std; namespace XRIT { int Tools::CreateDir(string path) { boost::filesystem::path p(path); boost::filesystem::create_directories(p); return 1; } int Tools::DirExists(const char* path) { struct stat st = {0}; return (stat(path, &st)...
TOOL
0.873603
5.076419
9006e097-db62-41e1-b635-e01f2a8436bc
salimmia/Workstation
Problem Solving/Code_Template/Notes and files/code-library-shahjalal shohag/Graph Theory/Manhattan MST.cpp
#include<bits/stdc++.h> using namespace std; const int N = 2e5 + 9; int n; vector<pair<int, int>> g[N]; struct PT { int x, y, id; bool operator < (const PT &p) const { return x == p.x ? y < p.y : x < p.x; } } p[N]; struct node { int val, id; } t[N]; struct DSU { int p[N]; void init(int n) { for (int i...
ALGO
0.999929
4.909628
1761dcf6-9a26-457a-98cc-32a2e18d0c38
aydarbek30/PP1_labs
pp1_Labs-main/Quiz 2 (midterm)/g.cpp
#include <iostream> //aydarbek #include<algorithm> #include<cmath> using namespace std; int main(){ int n; int b; int mem; cin>>n; cin>>b; cin>>mem; if(mem==1){ for(int i=1; i*i<=b; i++){ if(i*i>=n){ cout<<i*i<<" "; } } } if(mem==-1){ for(int i=b; i>=0; i--){ if(i*i<=b &&...
ALGO
0.999813
3.493138
fc77e308-03d7-4f16-955a-f877725b623a
devilsympathy/15
1.5.04.cpp
#include <iostream> int main() { setlocale(LC_ALL, "ru"); const int size = 10; int arr[size] = { 10, 3, 4, 1, 8, 9, 7, 2, 6, 5 }; bool swapped = false; std::cout << "Массив до сортировки: "; for (int i = 0; i < size; ++i) { std::cout << arr[i] << " "; } std::cout << std::e...
ALGO
0.999981
5.088345
2d5bbb05-e0db-4ec5-a008-5b5843bcb7ba
Y-M-M/experiment
algorithm/0-1背包和最大子段和/max_sum/test.cpp
// 用最大和减去最小和 // 存在的问题:如果最小和出现在最大和的右边,则会出错 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> nums; int num; while (scanf("%d", &num) != EOF) { nums.push_back(num); } int n = nums.size(); int maxsum = 0; int minsum = 0; in...
ALGO
0.999986
4.372001
5468c0ac-c04e-4943-a02d-e422f4979181
arangodb/arangodb
3rdParty/icu-legacy/icu64/common/uset.cpp
#include "unicode/utypes.h" #include "unicode/uobject.h" #include "unicode/uset.h" #include "unicode/uniset.h" #include "cmemory.h" #include "unicode/ustring.h" #include "unicode/parsepos.h" U_NAMESPACE_USE U_CAPI USet* U_EXPORT2 uset_openEmpty() { return (USet*) new UnicodeSet(); } U_CAPI USet* U_EXPORT2 uset_o...
TOOL
0.903942
7.51751
5ebe2f50-ea11-4f7a-9b00-206339e2d3b5
ZERstar/Leetcode
1768-merge-strings-alternately/1768-merge-strings-alternately.cpp
class Solution { public: string mergeAlternately(string word1, string word2) { string result=""; int i=0; while(i < word1.length() || i < word2.length()){ if(i < word1.length()){ result += word1[i]; } if(i < word2.length()){ ...
ALGO
0.999969
5.966129
ecf2bfa6-5caa-4162-941b-48f8546ff864
ppppplus/habitat-ros
habitat_sim/src/deps/eigen/unsupported/doc/examples/MatrixSine.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { MatrixXd A = MatrixXd::Random(3,3); std::cout << "A = \n" << A << "\n\n"; MatrixXd sinA = A.sin(); std::cout << "sin(A) = \n" << sinA << "\n\n"; MatrixXd cosA = A.cos(); std::cout << "cos(A) = \n" << cos...
ALGO
0.956236
5.878768
be5b46c5-6a16-46e7-9b20-18f0d68d6574
nodchip/icfpc2021
libs/boost_1_76_0/libs/bimap/example/mi_to_b_path/mi_bidirectional_map.cpp
/****************************************************************************** Boost.MultiIndex ******************************************************************************/ #include <boost/config.hpp> //[ code_mi_to_b_path_mi_bidirectional_map #include <iostream> #include <boost/tokenizer.hpp> #include <boost/m...
ALGO
0.956729
6.423507
8e79575c-c90b-4173-86b5-09c7d2ddfc77
ishandutta2007/codeforces
superpear/normal/148/B.cpp
#include <cstdio> #include <iostream> #include <cstring> #include <cstdlib> #include <cmath> #include <set> #include <algorithm> #include <map> #include <bitset> #include <vector> #include <queue> #include <stack> #include <utility> #include <functional> #include <sstream> #include <list> #include <complex> #define ma...
ALGO
0.999913
3.288583
394056f5-04e8-4e1b-a80e-470247328e9e
DaveJMir/aoc
day7/main.cpp
#include "util/util.hpp" #include <span> #include <string_view> #include <vector> using namespace aoc::util; std::uint64_t concatenate(std::uint64_t a, std::uint64_t b) { std::uint64_t scale = [](std::uint64_t term) { if (term < 10) return 10; if (term < 100) return 100; if (term < 1000) ...
ALGO
0.994862
6.058492
a2fd4370-47c9-4536-bc75-d371e3d6d7ea
cy1366371760/CP
cf1286/c/optimize.cpp
#include<bits/stdc++.h> #define nl '\n' #define ll long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define pb push_back #define eb emplace_back #define fi first #define sc second #define pii pair<int, int> #define pll pair<ll, ll> template<typename T> bool chkmin(T &a, T b){re...
ALGO
0.999949
3.854676
4de0a436-afea-441d-9546-ed21fa0b0598
ndsev/erdblick
libs/core/src/geometry.cpp
#include "glm/glm.hpp" #include "geometry.h" #include "cesium-interface/point-conversion.h" using namespace mapget; Point erdblick::geometryCenter(const SelfContainedGeometry& g) { // Initialize variables for averaging. auto totalPoints = g.points_.size(); auto const& points = g.points_; // Lambda t...
TOOL
0.989966
4.173164
3e2860ca-aa59-489c-b0b3-092c7d03ea6a
vvega-a/algorithm_study
BOJ/NO.10026/bfs.cpp
/* 문제 : https://www.acmicpc.net/problem/10026 풀이 : 넓이 우선 탐색으로 문제를 해결, 색맹 환자의 경우 G를 R로 전부 바꿔서 한번 */ #include<cstdio> #include<string> #include<iostream> #include<algorithm> #include<queue> using namespace std; int n; char arr[102][102]; int dx[4] = { 1,-1,0,0 }; int dy[4] = { 0,0,1,-1 }; bool visit[102][102]; typedef...
ALGO
0.995039
3.730702
1cd616e1-d3cd-4cf4-a0aa-be323df7d68b
mamurjondev/algo.ubtuit.uz
0342.cpp
#include<bits/stdc++.h> using namespace std; int k; main () { string s; getline(cin,s); char m[10] = {'a','i','o','e','u','A','I','O','E','U'}; for(int i=0; i<s.size();i++) for(int j=0; j<10; j++) if(s[i]==m[j]) k++; cout << k; }
ALGO
0.999196
3.596705
a1f87515-de77-4286-a100-4f241584f5bd
davidnuno/DataStructures
binaryTree.cpp
/*PROBLEM: Write the definition of the function nodeCount, that returns the number of nodes in the binary tree. Add this function to the class binaryTreeType and create a program to test this function.*/ #include<iostream> using namespace std; template<class elemType> struct node { //STRUCT TO STORE NOD...
ALGO
0.999044
6.066442
ddd45759-653c-4cb8-af7a-cddef72371e4
Mirzaazmath/flutter_tesla_roadster
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.9988
6.76073
ad1f8c11-1337-4084-a8bf-4fa62ca8db6c
dmshakur/cpp-course
c++_pointers_to_functions_2.cpp
#include <iostream> #include <string> #include <vector> using namespace std; void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } int main() { int x {100}, 7 {200}; cout << "\nx: " << x << endl; cout << "y: " << y << endl; swap(7x, &y); cout << "\nx: " << x << endl; cout << "y: " << y...
ALGO
0.993273
4.383132
4e3c6fb2-bc4b-41d9-8397-492cfe717a0a
sayIshuu/Algorithm-Study-Cplus
2023스터디/너비우선탐색/유기농 배추/BJ1012.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; int t, n, m, num; int map[50][50]; typedef struct { int x; int y; }Node; int dx[] = {0,0,1,-1}; int dy[] = {-1,1,0,0}; void bfs(int tx, int ty) { map[tx][ty] = 0; //湮üũ queue<Node> q; q.push({tx, ty}); while (!q.empt...
ALGO
0.99977
4.89655
cd0b98fe-c577-4810-9802-e38d3131018b
ixray-team/xray-vss-archive
net.ssa/xrPlugins/xrCore/Source/crc32.cpp
#include "stdafx.h" #pragma hdrstop static BOOL crc32_ready = FALSE; static u32 crc32_table [256]; // Lookup table array inline u32 Reflect (u32 ref, char ch) // Reflects CRC bits in the lookup table { // Used only by Init_CRC32_Table(). u32 value(0); // Swap bit 0 for bit 7 // bit 1 for bit 6, et...
ALGO
0.991923
5.907223
6e7a3092-1ac8-474e-9a5d-088e6e759cd0
nagnitin/cpp-assignments
Introduction to C++/Input and Operators - AS02/q3.cpp
/*Find the output for this code. Let input:- 2 3 #include <iostream> using namespace std; int main() { int x,y; cin>>x>>y; x+=y; //5 x-=y; //2 x%=y; // 2 % 3 cout<<x; } Ans.: Output Window: 2 3 0 */
ALGO
0.998888
3.409963
fd95abac-f043-4567-a4c5-fe1ba492424c
Jhonathan-Pizarra/Cpp
Programas/17_parametros_multiples.cpp
#include <iostream> using namespace std; int addNumbers(int x, int y) { int result = x + y; return result; } int addNumbers2(int x, int y, int z, int a) { int result = x + y + z + a; return result; } int main() { cout << addNumbers(4, 5); cout << endl; //También puedes asignar el valor re...
ALGO
0.969584
4.548781
dd6e8bf1-3b62-45ba-9a99-4d6b6eea6903
ishandutta2007/codeforces
purplecrayon/normal/1163/C1.cpp
#include <cstdio> #include <map> #include <set> #include <utility> const int N = 1001; int x[N], y[N]; std::map<std::pair<int,int>,std::set<long long>> slope_map; int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a); } int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; ++i) scanf("%d%...
ALGO
0.999727
4.047515
ea588da3-e988-4f5a-88e5-4f49a339d4b5
thegamer1907/Code_Analysis
contest/1542594245.cpp
#pragma GCC optimize("O3") #pragma GCC target("sse4") #include <iostream> #include <vector> #include <string> #include <algorithm> #include <iomanip> #include <numeric> #include <set> #include <map> #include <cassert> #include <deque> #include <numeric> using namespace std; //#define int long long #define len(v) (int...
ALGO
0.99996
3.928251
71358554-83dd-4bd0-a545-35987f3dc1b5
viniciuslfernandes/Estudos_Programacao_Competitiva
Aula_Programacao_Competitiva/VJudge/3_L2 - PCOM20242/D_Odd_Man_Out.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n; cin>>n; for(int j = 1; j<=n; j++){ int g; cin>>g; map<ll, int> mapa; for(int i=0; i<g; i++){ ll aux; cin>>aux; if(mapa[aux]!=0){ mapa.erase(aux); ...
ALGO
0.999065
3.479536
844b25f7-3be7-4c45-bca2-5da6568b2cac
a37052800/c
UVa/tempCodeRunnerFile.cpp
#include <cstring> #include <iostream> using namespace std; int main() { string sa, sb; while (cin >> sa >> sb) { if (sa == "0" && sb == "0") break; int a[11], b[11]; memset(a, 0, sizeof(a)); memset(b, 0, sizeof(b)); for (int i = 0; i < 10; i++) { ...
ALGO
0.999642
4.495034
72ae91a8-5a58-46ec-9aa6-04c402bd6f56
EURO-KOLYAN/CnC_Generals_Zero_Hour
Generals/Code/Tools/WW3D/max2w3d/maxworldinfo.cpp
/*********************************************************************************************** *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S *** *********************************************************************************************** * ...
TOOL
0.991128
5.877435
b79a66d0-8fad-475a-874c-ce44bfaa7d71
SakshiMahale/OS
LRU_PageReplacement.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void lru_algo(vector<int> pages, int frame_size) { vector<int> page_frame; int page_faults = 0; for (int i = 0; i < pages.size(); i++) { int page = pages[i]; // Check if the page is already in the frame (Page...
ALGO
0.999889
6.848807
54396668-b751-4882-ac99-8ce96b6b1fe1
TrueStar02/Practice
S2-C++ Practice/Unit 16/11-vector2/vector2.cpp
#include<iostream> #include<vector> using namespace std; int main(void) { vector<int> v1; int x; for(x=0;x<10;x++) v1.push_back(x); cout<<"The size of v1:"<<v1.size()<<endl; vector<int> v2; for(x=0;x<100;x++) v2.push_back(100+x); vector<int>::iterator i; i=v1.begin(); v2.erase(v2.begin()+30,v2.begin()+40); ...
ALGO
0.987339
3.385279
8139d359-baa8-4ffd-8ffd-666026df17b9
WardKhaddour/Problems-Solutions-For-Competitive-Programming
Codeforces/1200/Exam in BerSU (easy version) (1185C1).cpp
#include <bits/stdc++.h> #include <ctime> #define int long long int #define F first #define S second #define pb push_back #define pi pair<int,int> #define mp make_pair #define endl "\n" #define dbg cout << "HERE!!!" << endl #define rep(n) for(int i = 0;i < n; ++i) #define fastscan() {ios_base::sync_with_stdio(false);c...
ALGO
0.99999
3.419744
7ffb1f9f-6266-4229-9c2b-a0bab783bceb
CHiiii5640/2023aaia3
week16/week16-4(a).cpp
// Dz߭pebinary treeĤ@D class Solution { public: int maxDepth(TreeNode* root) { if(root==nullptr) //פ return 0; int ans1=maxDepth(root->left); int ans2=maxDepth(root->right); return 1+max(ans1,ans2); } };
ALGO
0.999878
6.235725
8a71f99a-7110-4d25-9a5c-5b2b9e4ba4e3
ishandutta2007/codeforces
fanache99/normal/731/F.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAXN = 200000; int v[1 + MAXN]; int BinarySearch(int left, int right, int value) { int answer = left - 1; while (left <= right) { int middle = (left + right) / 2; if (v[middle] < value) { ans...
ALGO
0.999818
3.396476
b531f6a7-59c2-41f8-aeb0-13f92aeb2d5f
aryan7412/DSA_C-
MovingZerosToEnd.cpp
#include <iostream> #include <climits> #include <vector> using namespace std; vector<int> moveZeros(int n, vector<int> a) { // Write your code here. int i=0; for(int j=0; j<n; j++){ if(a[j]!=0){ swap(a[i],a[j]); i++; } } return a; } int main(){ vector <int...
ALGO
0.999663
4.215851
9fe4a918-846d-4caf-ae9d-45b8305ace7f
Melaslan/EncryptionCodes
ceaser_şifrelme.cpp
// Caesar ifreleme rnei yaplacaktr. #include <iostream> #include <string> using namespace std; string caesar_sifreleme(string mesaj, int shift) { string result = ""; for (int i = 0; i < mesaj.length(); i++) { if (isupper(mesaj[i])) { result += char(int(mesaj[i] + shift - 65) % 26 + 65); ...
ALGO
0.992607
5.16189
53a1dea0-aadc-4cd1-a31f-6434264563f1
jun-pac/PS
240621/8set/B.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define cediv(a,b) ((a)%(b)==0?((a)/(b)):((a)/(b))+1) #define rng(i,a,b) for(int i=int(a);i<=int(b);i++) #define rep(i,b) rng(i,0,b-1) #define gnr(i,b,a) for(int i=int(b);i>=int(a);i--) #define per(i,b) gnr(i,b-1,0) #define pb push_back...
ALGO
0.999567
5.286024
7d16a08c-36e6-47b0-9e3d-9aad0613c505
Skordio/leetcode-solutions
6_zigzag_conversion/good_solution.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: string convert(string s, int numRows) { if (numRows == 1) { return s; } vector<int> char_group_indices = {}; int down_group_height = numRows; in...
ALGO
0.999996
5.894068
3726a729-4848-4225-aee5-dffd2a8b4b79
alanyuchenhou/gene-expression
eigen/doc/examples/class_Block.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<const Derive...
TOOL
0.951517
5.93207
6216623f-8eb2-4393-8965-92dfb60cced6
perchuts/CompetitiveProgramming
AtCoder/abc411/c.cpp
#include <bits/stdc++.h> #define all(x) x.begin(), x.end() #define sz(x) (int) x.size() #define endl '\n' #define pb push_back #define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define int ll using namespace std; using ll = long long; using ull = unsigned long long; using ii = pair<int,int>; us...
ALGO
0.999902
4.538612
29a83ddb-4bae-43ea-9427-959125437063
VenusCh001/bloodSweatTears
assign2operators/q5.cpp
//Write a program to calculate the sum of digits of a 3 digit number. #include<iostream> using namespace std; int main(){ int num,first,second,last; int sum=0; cout<<"give three digit number"<<endl; cin>>num; first=num/100; second=(num%100)/10; last=(num%100)%10; sum=first+second+last; ...
ALGO
0.999735
4.437313
29bf66b3-2c93-454b-a0f9-bdf070d92a4d
AnaMaritzaTe/ComputacionGraficaAvanzada2
CGALib/src/ShadowBox.cpp
#include "Headers/ShadowBox.h" ShadowBox::ShadowBox(glm::vec3 direction, Camera * camera, float shadowDistance, float nearPlane, float fovy){ this->front = glm::normalize(direction); this->camera = camera; this->shadowDistance = shadowDistance; this->nearPlane = nearPlane; this->fovy = fovy; } void ShadowBox::up...
TOOL
0.964191
5.4733
c93e2f33-7f89-43a5-9c7d-49bc34f023d3
mainul3195/codes
Others/F_Explosion.cpp
#include <bits/stdc++.h> using namespace std; vector<int> degree; int n, p, tr; int gcd(int a, int b) { if(!b) return a; return gcd(b, a%b); } void solve() { cin >> n >> p >> tr; degree = vector<int>(n + 1, 0); for (int i = 1; i < n; i++) { int u, v; cin >> u >> v; ...
ALGO
0.999819
4.686371
9a4f0e3d-90e6-4474-8ec1-2b9e5f6b0853
ishandutta2007/codeforces
alexluchianov/normal/242/E.cpp
#include <iostream> #include <vector> using namespace std; using ll = long long; #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MAX(a, b) (((a) < (b)) ? (b) : (a)) int const lgmax = 20; class SegmentTree{ private: vector<int> aint; vector<int> lazy; public: SegmentTree(int n){ aint.resize(4 * n); ...
ALGO
0.999918
4.649559
dfc25e44-2b1d-4158-981f-7fa1419633c0
Marioo83GitHub/BackgammonCPP
Backgammon_old.cpp
#include <iostream> #include <stdlib.h> #include <cstdlib> #include <ctime> #include <math.h> using namespace std; class Dado { public: int tirar(); }; int Dado::tirar() { srand(time(NULL)); int aleatorio = rand() % 6; return aleatorio + 1; } class Casilla { private: int cant_p...
ALGO
0.984456
4.916743
2480dbf4-53c8-4b5a-b951-3d9945e2e476
Raiyan-Maksud/Problem-Solutions
Codechef/Three_Way_Communications.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int r; cin>>r; int x1,y1,x2,y2,x3,y3; cin>>x1>>y1>>x2>>y2>>x3>>y3; int d12=pow((x2-x1),2) + pow((y2-y1),2); int d13=pow((x3-x1),2) + pow((y3-y1),2); int d23=pow((x2-x3),2) + pow((y2-y3),2); ...
ALGO
0.999904
4.263107
2ef83938-0e96-421b-822c-90ea71574c2c
porwalarchit/cpp-DSA-Course-Codes
Graph/14_Topo_Sort_BFS_Kahn_Algo.cpp
#include<bits/stdc++.h> using namespace std; vector<int> topoSort_Kahn(int N, vector<int> adj[], vector<int> &indegree){ queue<int> q; for(int i=1; i<=N; i++){ if(indegree[i]==0){ q.push(i); } } vector<int> topo; while(!q.empty()){ int node = q.front(); ...
ALGO
0.999999
5.464212
70035696-1378-410d-a812-63e3d8104c54
martinbudden/SuperSlicer
src/libigl/igl/copyleft/cgal/component_inside_component.cpp
#include "order_facets_around_edge.h" #include "../../LinSpaced.h" #include "points_inside_component.h" #include <CGAL/AABB_tree.h> #include <CGAL/AABB_traits.h> #include <CGAL/AABB_triangle_primitive.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <cassert> #include <list> #include <limits>...
ALGO
0.992004
6.878416
b6a5a93e-eafa-4a11-9632-0173de22af08
ishandutta2007/codeforces
tadijasebez/normal/1307/B.cpp
#include <stdio.h> #include <algorithm> #include <vector> #include <queue> #include <deque> #include <set> #include <map> #include <stdlib.h> #include <ctime> #include <cmath> #include <complex> #include <iostream> #include <cctype> #include <cstring> #include <bitset> #include <stack> #include <functional> #include <c...
ALGO
0.999972
3.289353
4340d253-03ff-4ed6-8060-e7737cc5d6d6
raincross7/code-similarity
codes/train_code/problem195/problem195_410.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<iomanip> using namespace std; int main(){ int n; cin>>n; int a[n]; const long long INF=1LL<<60; long long dp[n]; for(int i=0;i<n;i++)cin>>a[i]; for(int i=0;i<n;i++)dp[i]=INF; dp[0]=0; for(int i=1;i<n;i...
ALGO
0.999981
4.066128
1ab2b945-bbbb-4a60-aa0b-2d9d564b5264
Seunghwan8334/Baekjoon-Practice
12100.cpp
#include <stdio.h> #include <vector> using namespace std; vector <int> v[22]; int n; int ans = 0; void getans(int a[22][22]) { for (int i=1; i<=n; i++) { for (int j=1; j<=n; j++) { if (a[i][j] > ans) ans = a[i][j]; } } } void addvec() { for (int i=1; i<=n; i++) { ...
ALGO
0.999845
3.249109
e8162c0b-73d7-4ad8-9de7-e6dae3088990
utmishr/CSES
Creating_strings.cpp
#include <bits/stdc++.h> using namespace std; int main() { string str; vector<string> s; cin >> str; if (str.length() == 0) { cout << "No Permutations Possible!!"; } else { sort(str.begin(), str.end()); do { s.push_back(str); } while (next_permutation(str.begin(), str.end()));...
ALGO
0.999986
5.342179
2cd8e1b9-828d-4e9b-a82f-3aa0beb838ed
Mintroxiss/s21_containers
src/files/s21_set.cpp
#include "../include/s21_set.h" namespace s21 { // Конструктор со списком инициализации template <typename key_type> set<key_type>::set(const std::initializer_list<value_type> &items) { for (const value_type &item : items) { this->insert(item); } } // Оператор присваивания (копирования) template <typename ke...
ALGO
0.989881
5.292389
233ddf16-c517-4cd8-902e-78ef34fa1cdc
raincross7/code-similarity
codes/train_code/problem078/problem078_77.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s, t; vector<int> u(30, -1), v(30, -1); cin >> s >> t; for (size_t i = 0; i < s.size(); i++) { int p = s[i] - 'a', q = t[i] - 'a'; if (u[p] == -1) u[p] = q; else if (u[p] != q) { cout << "No" << endl; ...
ALGO
0.999999
4.270581
29f75100-8e2f-4b8c-ae38-0e385ee34e04
ishandutta2007/codeforces
shayan.p/normal/796/D.cpp
// Believe in yourself... #include<bits/stdc++.h> #define MP make_pair #define PB push_back #define PF push_front #define POB pop_back #define POF pop_front #define F first #define S second #define sz(c) (c).size() #define REP(i,n) for(ll i=0;i<n;i++) #define REPD(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,a,b) for(ll ...
ALGO
0.999991
3.561167
2325a82a-bb71-4957-a33b-e4e981f85058
HuanHuanHuanFFF/HuanF-CodeX
Code Instrumentality Initiative/XCPC/ShangdonICPC 13th 2023/L.cpp
#include <bits/stdc++.h> using std::cin; using std::cout; using std::pair; using std::vector; using std::string; using ll = long long; using ull = unsigned long long; using PII = pair<int, int>; constexpr int MOD = 1e9 + 7; constexpr ll INF = 7e17 + 17; constexpr int N = 1e7 + 7; void IOS() { std::ios::sync_with...
ALGO
0.999872
3.390555
506e5c8f-d02e-4710-bbf8-e2d65bf3496b
nessux/path-guiding-many-lights
visualizer/nanogui/ext/eigen/test/eigen2/eigen2_visitor.cpp
#include "main.h" template<typename MatrixType> void matrixVisitor(const MatrixType& p) { typedef typename MatrixType::Scalar Scalar; int rows = p.rows(); int cols = p.cols(); // construct a random matrix where all coefficients are different MatrixType m; m = MatrixType::Random(rows, cols); for(int i =...
TEST
0.895137
5.877094
09579a90-41e2-4fde-9421-912a2dd43d6e
helloobaby/llvm_msvc
llvm/lib/Analysis/StackLifetime.cpp
#include "llvm/Analysis/StackLifetime.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/Config/llvm-config.h" #include "llvm/IR/AssemblyAnnotationWriter.h" #include "llv...
TOOL
0.973092
7.519656
8a86e801-a235-44b2-8d60-8d03d42ca75a
paulnewman1979/edocteel
062/623/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stdio.h> #include <assert.h> #include <stdlib.h> #include "../../template/common/Input.hh" #include "../../template/common/Output.hh" using namespace std; typedef BaseTreeNode<int> TreeNode; class Solution { public: TreeNode* addOneRow(TreeNode...
ALGO
0.999953
5.494586
e9e0b07e-26ca-425e-8118-7f0248492595
andrew2719/Algorithms
double_ll/ref_dll.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node *prev,*next; Node(int val) { data = val; prev = next = NULL; } }; Node* double_ll_insert(Node* head, int val) { Node* temp = head; if(head==NULL) { return new Node(val); } ...
ALGO
0.999993
4.448217
be188f90-d49d-4529-a696-068698279ff1
alparslanaslan1/cpp_module_09
ex01/main.cpp
#include <iostream> #include "RPN.hpp" int main(int argc, char** argv) { if (argc != 2) { std::cerr << "Error" << std::endl; return 1; } try { RPN rpn; int result = rpn.evaluate(argv[1]); std::cout << result << std::endl; } catch (const std::exception& ...
ALGO
0.855025
5.887934
57f3152a-4ab6-4d41-a96c-5889e8629f55
priamm2/TelegramCamera
TMessagesProj/jni/rlottie/src/vector/vinterpolator.cpp
#include "vinterpolator.h" #include <cmath> V_BEGIN_NAMESPACE #define NEWTON_ITERATIONS 4 #define NEWTON_MIN_SLOPE 0.02 #define SUBDIVISION_PRECISION 0.0000001 #define SUBDIVISION_MAX_ITERATIONS 10 const float VInterpolator::kSampleStepSize = 1.0 / float(VInterpolator::kSplineTableSize - 1); void VInterpolator:...
ALGO
0.999613
6.573218
547f1d9c-c6bf-48d3-87ba-82f169292268
pranay823/oops
multilevel.cpp
#include<iostream> using namespace std; class grandparent{ protected : char name[30]; int birth; public : void get_input(){ cout<<"enter the grandparent name and the birth year "; cin>>name>>birth; } }; class parent : pub...
ALGO
0.994574
3.900266
edf3d06a-bb26-4c21-96e7-09c4fa57dd66
codesniper99/Coding-Competitions
hello newyear 2019 codeforces/C.th/main.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; #define ll long long int #define li long int using namespace std; typedef vector<long long int> vi; typedef pair<ll, ll> pi; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set...
ALGO
0.999416
3.848425
29695797-7443-4e82-937c-9a6f770e1fec
Darkclaw1704/DSA-BABBAR
Lectures/lecture 23/searchInMatrix.cpp
#include <iostream> #include <vector> using namespace std; bool searchMatrix(vector<vector<int>>& matrix, int target) { int row = matrix.size(); int col = matrix[0].size(); int start = 0; int end = row*col - 1; int mid = start + (end-start)/2; while(start <= end){ if(matri...
ALGO
0.999912
5.592415
79ea882a-9165-4c66-a09e-4b240aba1a80
Prateek-Pandey-96/Algorithms
STACK/Decode String.CPP
// 394. Decode String class Solution { public: string decodeString(string s) { string result; for(auto ch: s){ if(ch!=']') result.push_back(ch); else{ string curr, num; while(result.size() and result.back() != '['){ ...
ALGO
0.998826
5.980482
ddeaac71-8fa1-4dcc-9c52-1850fbc6d292
yooniversal/SWMaestro-coding-test
yooniversal/7490.cpp
// 7490 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<pair<int, int>> vii; typedef pair<int, int> ii; const int MAX = 100005, INF = 1000000001, MOD = 1000000000; int n; vector<string> ret; pair<vi, vector<char>> new_string(s...
ALGO
0.999855
5.939856
b3a218bb-4240-4b71-ba2f-da2d1ebec9aa
Xilinx/hls-llvm-project
llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
#include "llvm/Transforms/Utils/BypassSlowDivision.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/None.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Constants.h" #includ...
ALGO
0.97453
7.933013
f7386e59-1e08-4822-823e-399452d80780
sendoru/ps-cpp-new
source/boj/1991.cpp
#include <iostream> #include <vector> using namespace std; void postorder(vector<pair<int, int>>& tree, vector<bool>& visited, int curNode) { cout << (char)(curNode + 'A'); if (tree[curNode].first != -1 && !visited[tree[curNode].first]) { postorder(tree, visited, tree[curNode].first); } if (tree[curNode].second...
ALGO
0.999949
4.337781
73222f33-6e16-4141-a142-9e8f9157b37a
rajeevrj256/GFG_Streak_
Difficulty: Easy/Binary Tree Representation/binary-tree-representation.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; struct node { int data; struct node *left; struct node *right; }; struct node *newNode(int data) { struct node *node = (struct node *)malloc(sizeof(struct node)); node->data = data; node->left = NULL; node->...
ALGO
0.999405
5.110108
6d2efc07-e9e8-4552-badd-0179b8cff298
green-anger/GlobeViewer
lib/src/Projector.cpp
#include <algorithm> #include <cmath> #include <string> #include "Projector.h" namespace gv { Projector::Projector() : projection_( nullptr ) { context_ = proj_context_create(); setProjectionAt( 0.0, 0.0 ); projLon_ = 0.0; projLat_ = 0.0; } Projector::~Projector() { proj_destroy( projection_...
TOOL
0.872484
7.277174
79999235-8efb-4838-8904-500f25033ed8
Dev-Abdullah-786/Assignments
CS301 Assignment no 1.cpp
#include<iostream> #include<conio.h> #include<windows.h> #include<time.h> using namespace std; class Node { private: int object; Node *nextNode; public: void set(int value) { object = value; } int get() { return object; } void setNext(Node* ptr) { nextNode = ptr; } Node* getNext() ...
ALGO
0.999101
3.620089
7efbac76-68d5-4f5c-913b-cbbb10d803e4
llvm/llvm-project-staging
llvm/lib/CodeGen/MachineOutliner.cpp
#define DEBUG_TYPE "machine-outliner" using namespace llvm; using namespace ore; using namespace outliner; STATISTIC(NumOutlined, "Number of candidates outlined"); STATISTIC(FunctionsCreated, "Number of functions created"); // Set to true if the user wants the outliner to run on linkonceodr linkage // functions. Thi...
TOOL
0.961916
7.30407
8f969dc8-677d-48d4-bbae-bccd65e9e522
UM1985/100-days-challenge
Day-97 Finding Minimum sum of absolute difference of given array/code.cpp
#include <iostream> #include <limits.h> using namespace std; void minSum(int arr[], int size,int &result) { for (int i = 0; i < size; i++) { int sum = 0; // variable to hold the sum for (int j = 0; j < size; j++) { int x = arr[i] - arr[j]; if (x < 0) ...
ALGO
0.999937
5.220975
7c80a769-2664-4c6f-804d-0c9bee51cec1
shubham-deshmukh/CP-Contests
CodeChef/starters_105/cheat.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define lld long double #define ull unsigned long long #define ff first #define ss second #define all(x) x.begin(), x.end() #define rep(i,start,end) for(i = start; start < end ? i < end : i ...
ALGO
0.999769
4.07227
eb8830db-a30d-4931-adc4-75956ecd6e8d
sean-baek/programming_language_study
cpp/모두의코드/Date_class.cpp
#include <iostream> using namespace std; class Date { int year_; int month_; int day_; public: void SetDate(int year, int month, int data); void AddDay(int inc); void AddMonth(int inc); void AddYear(int inc); int GetCurrentMonthTotalDays(int year, int month); void ShowDate(); }; ...
TOOL
0.935823
4.41375
13a64f4a-1ad7-4885-9c21-8d5cc3c1754f
MacDumi/Turbo-Pump-Controller
Firmware/Core/Pirani.cpp
/* * Pirani.cpp * * Created on: Aug 8, 2021 * Author: DD */ #include "Pirani.h" #include "math.h" #include <stdlib.h> Pirani::Pirani(float _coef) { coef = _coef; label = "FV "; } void Pirani::update(float _voltage) { voltage = coef * _voltage; pressure = pow(10, voltage - c); if (voltage <= 0.5 || vo...
TOOL
0.908471
5.117056
0f44f357-6241-436c-9670-428b4feb8aba
oussamakhadraoui/c-learning
training3.cpp
#include <bits/stdc++.h> using namespace std; int get_pgcd(int a, int b) { int pgcd = 0; while(1) { pgcd = a % b; if(pgcd == 0) { pgcd = b; break; } a = b; b = pgcd; } return pgcd; } class Solution { public: int heightCh...
ALGO
0.999795
4.586079
ec06abef-a5ae-46ec-b1a7-9fa88bc10455
Eclipse-Community/eMail-aura-test
intl/icu/source/tools/genrb/prscmnts.cpp
// Safer use of UnicodeString. #ifndef UNISTR_FROM_CHAR_EXPLICIT # define UNISTR_FROM_CHAR_EXPLICIT explicit #endif // Less important, but still a good idea. #ifndef UNISTR_FROM_STRING_EXPLICIT # define UNISTR_FROM_STRING_EXPLICIT explicit #endif #include "unicode/regex.h" #include "unicode/unistr.h" #include "un...
TOOL
0.869556
5.494097
38ce35bb-509d-4f3e-8f49-14fca7828ac2
ishandutta2007/codeforces
sfiction/normal/297/A.cpp
/* ID: Sfiction OJ: CF PROB: 297A */ #include <cstdio> const int MAXN=1000; char a[MAXN+1]; char b[MAXN+1]; int main() { int i; int suma,sumb; scanf("%s",a); scanf("%s",b); for (suma=i=0;a[i];++i) suma+=a[i]=='1'; for (sumb=i=0;b[i];++i) sumb+=b[i]=='1'; suma+=suma&1; if (suma>=sumb) pri...
ALGO
0.999976
3.735644