uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
c70dda33-2742-45e2-97fa-3dccb8ba9b09 | noveky/proposition-and-matrix-calculator | CppCalc/Proposition/Variable.cpp | #pragma once
#include <vector>
#include <set>
#include <algorithm>
#include <memory>
#include "Variable.h"
using namespace std;
int Variable::nxtIndex = 0;
/// A compare function for shared_ptr<Variable>, in order to sort containers of type shared_ptr<Variable>
static bool compVariablePtr(shared_ptr<Variable> vp1, sh... | ALGO | 0.974563 | 5.680477 |
00e83dd5-66b7-40bd-a66e-6970fb8f4871 | DevashishPathrabe/Hackerrank | HackerRank Solutions/Problem Solving/Mathematics/Fundamentals/Handshake/Handshake.cpp | #include <bits/stdc++.h>
using namespace std;
/*
* Complete the handshake function below.
*/
int handshake(int n) {
/*
* Write your code here.
*/
return(n*(n-1)/2);
}
int main()
{
ofstream fout(getenv("OUTPUT_PATH"));
int t;
cin >> t;
cin.ignore(numeric_limits<streamsize>::max(),... | ALGO | 0.999828 | 6.147379 |
e011b6ed-ad6d-498f-814d-39f227908e96 | MOHITYADAV10137/gfg | Medium/Grinding Geek/grinding-geek.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
// Simple DP solution
int helper(int i, vector<int> &cost, int total, int n, vector<vector<int>> &dp){
if(total <= 0) return 0;
if(i == n) return 0;
... | ALGO | 0.999582 | 4.861735 |
a07d7012-e55b-47a6-8a3e-3e65d04091eb | guilhermetwelve0/exercicios-em-c- | atividade3.2.cpp | #include<iostream>
using namespace std;
int main (){
int i;
while( i <= 201){
for ( i = 100; i <= 200 ; i++ ){
printf ("Numero: %d\n",i);
}
return 0;
}
} | TOOL | 0.976083 | 3.174096 |
0ae979cc-1e4b-4b1b-a3ef-b91aa9574fdc | BKAUTO/ImageStitching-based-on-NISwGSP | UglyMan_NISwGSP_Stitching/UglyMan_NISwGSP_Stitching/eigen/bench/product_threshold.cpp |
#include <iostream>
#include <Eigen/Core>
#include <bench/BenchTimer.h>
using namespace Eigen;
using namespace std;
#define END 9
template<int S> struct map_size { enum { ret = S }; };
template<> struct map_size<10> { enum { ret = 20 }; };
template<> struct map_size<11> { enum { ret = 50 }; };
template<> struct ... | TOOL | 0.901282 | 5.096755 |
bd7a52da-b0cf-496d-b95f-312e65609603 | AlexTerencio/TP_n-1 | Exercice 14.cpp | #include <iostream>
#include <cmath>
using namespace std;
int main()
{
double a(0), b(0);
cout << "Bienvenue dans le programme qui calcul a^b" << endl;
cout << "Donner une valeur pour a : ";
cin >> a;
cout << "Donner une valeur pour b : ";
cin >> b;
double const resultat(pow(a,b));
cout... | ALGO | 0.994812 | 4.554831 |
2a640ab1-1241-4171-b05b-0e9a6baf6a61 | Bearackle/CodeTrain | 77. Combinations.cpp | #include<iostream>
#include<vector>
#include<memory>
#include<unordered_map>
#include<functional>
using namespace std;
class Solution {
public:
vector<vector<int>> combine(int n, int k) {
vector<vector<int>> combinations;
vector<int> temp_combination;
function<void(int,vector<int>)> backtra... | ALGO | 0.999947 | 5.584966 |
6a71dddc-7264-45a1-833a-332a43acc669 | YangKlee/C-plus-learning | KTLT/toigian.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
int x;
if(a > b)
x = b;
else
x = a;
int k = 1;
for(int i = 2; i <= x; i++)
{
if(a % i == 0 && b%i == 0)
{
k = i;
}
}
cout << a/k << ' '<<b/k;
} | ALGO | 0.999925 | 4.341955 |
44838235-1d37-4802-8805-77c7f1ea9881 | NIttaDragon/vuz_labas | SAOD-main/SAOD-main/saod_1_sem/dop_saod/saod_2_1.cpp | #include <iostream>
#include <string>
using namespace std;
int main()
{
string str1="18";
string str2="23";
string str3;
int d=0;
for(int i=0;i<str2.length();i++)
{
int a=int(str1[i]);
int b=int(str2[i]);
int c=a+b;
if(c>10)
{
d=c%10;
c=1;
}
if(i==0)
{
str3... | ALGO | 0.999774 | 4.372492 |
af83e4f6-6ded-4b00-b3f6-c8893d7a8691 | rupesh-dharme/LeetCode | 561-array-partition-i/561-array-partition-i.cpp | class Solution {
public:
int arrayPairSum(vector<int>& nums) {
int n = nums.size();
int sum = 0;
sort(nums.begin(), nums.end());
for (int i = 0; i < n; i+=2) {
sum += min(nums[i], nums[i+1]);
}
return sum;
}
}; | ALGO | 0.999845 | 5.946132 |
5caf28e7-f6f1-4d26-a135-8494d67a5050 | sahadat-11/CodeLibrary | Number Thoery/Count Divisors of Factorial.cpp | // approach 1:(important)
//In The Name of ALLAH
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7, mod = 1e9 + 7;
#define int long long
bitset<N>f;
vector<int> prime;
void sieve () {
f[0] = f[1] = true;
for(int i = 4; i < N; i = i + 2) f[i] = true;
for(int i = 3; i * i < N; i += 2) {
... | ALGO | 0.999865 | 5.795306 |
47dd1a3f-a045-4436-ac62-ed0acd3f0c2b | JaswanthJHK/chatbot_app | 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.998756 | 6.772262 |
242f7713-3c58-40c6-8f9c-5629ed252d19 | STORM-IRIT/algebraic-shape-operator | figures/src/PCP/SpacePartitioning/internal/IndexSquaredDistance.cpp | #include <PCP/SpacePartitioning/internal/IndexSquaredDistance.h>
namespace pcp {
bool IndexSquaredDistance::operator < (const IndexSquaredDistance& other) const
{
return squared_distance < other.squared_distance;
}
} // namespace pcp
| TOOL | 0.927878 | 4.987014 |
04d2531f-9daf-46ff-bff3-42a141a3de20 | Ypuyu/AcWing | lanqiaobei/ch06/1224.交换瓶子.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 10005;
int n;
int a[N];
int main() {
cin >> n;
for (int i = 0; i < n; i ++ ) cin >> a[i];
int res = 0;
for (int i = 1; i <= n; i ++ ) // 每次归位一个不在位置上的 i
for (... | ALGO | 0.999859 | 3.490869 |
fd1e39de-a68b-4a7d-9093-5dd976527d01 | Husain0007/HackerBlocks | Today'sCodeByte/BrokenCalculator/p.cpp | /*Calculate Factorial of large numbers*/
#include <iostream>
using namespace std;
int multiply(int factor, int *result, int result_size)
{
int carry = 0;
for (int i = 0; i < result_size; i++)
{
int product = result[i] * factor + carry;
result[i] = product % 10;
carry = product / 10... | ALGO | 0.999964 | 5.276237 |
4b7a3575-86ea-43e7-8d9e-e40e21fbb594 | h-devs/SLib | src/slib/math/calculator.cpp | #include "slib/math/calculator.h"
#include "slib/math/math.h"
#include "slib/core/parse.h"
namespace slib
{
namespace {
template <class CHAR>
SLIB_INLINE static sl_reg ParseNumber(sl_int32& result, const CHAR* str, sl_size posBegin, sl_size posEnd) noexcept
{
return StringTypeFromCharType<CHAR>::Type::par... | TOOL | 0.940729 | 6.443142 |
3e9a50b2-bb53-4ec5-9609-a22ecafe3e9f | raincross7/code-similarity | codes/train_code/problem170/problem170_75.cpp | #include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#define pb push_back
#define mpr make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ll long long
#define ld long double
#define all(arr) arr.begin(), arr.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define fo(i,... | ALGO | 0.999967 | 4.299885 |
eb6e786a-2514-420a-925d-223a151d8521 | rodriguezmatirp/Lab-Main | Sem 2/Data_structures_Lab/Worksheet 4/ds_ps4_3.cpp | #include <iostream>
#include "sparse_matrix.h"
using namespace std;
int main()
{
int r, c, i, j, nz1 = 0, nz2 = 0;
int a[10][10], b[10][10], **a1, **b1;
cout << "enter the rows of the matrix" << endl;
cin >> r;
cout << "enter the columns of the matrix" << endl;
cin >> c;
cout << "enter the ... | ALGO | 0.998 | 3.016279 |
ba3b92fc-7cd3-48a2-ae5d-e8d6038e2c2d | CMU-CBML/3D_THBNG | eigen-3.4.0/bench/spmv.cpp |
//g++-4.4 -DNOMTL -Wl,-rpath /usr/local/lib/oski -L /usr/local/lib/oski/ -l oski -l oski_util -l oski_util_Tid -DOSKI -I ~/Coding/LinearAlgebra/mtl4/ spmv.cpp -I .. -O2 -DNDEBUG -lrt -lm -l oski_mat_CSC_Tid -loskilt && ./a.out r200000 c200000 n100 t1 p1
#define SCALAR double
#include <iostream>
#include <algor... | ALGO | 0.929872 | 4.318557 |
f367e6df-82cd-4d1d-90c8-feefa3380749 | hjiang13/LLMs-in-IR | POJ-104/82/1722.cpp | #include <iostream>
using namespace std;
int main()
{
int n,a,b,k,j,i;
int m[100];
j=0;
cin >> "%d",&n);
for(k=1; k<=n; k++)
{
cin >> "%d %d",&a,&b);
if(90<=a&&a<=140&&60<=b&&b<=90)
{
j=j+1;
m[k-1]=j;
}
else
{
m[k-1]=0;
j=0;
}
}
for(i=1; i<=n; i=i++)
{
if(m[0]<m[i-1])
m[0]=m[i-1];
if(m[0]>=m[i-1])
m[0]=m[0];
}
cout << ... | ALGO | 0.999828 | 3.472758 |
d5177ec6-5899-4a9a-a888-53c300d0ed76 | konguele/c--_projects | loops/ex7.cpp | /* Escribe un programa que calcule el valor de:
1+2+3+...n */
#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
int n,suma=0;
cout<<"Digita el número de elementos: ";
cin>>n;
for(int i=1;i<=n;i++){
suma += i;
}
cout<<"\nLa suma es: "<<suma<<endl;
cin.get();
... | ALGO | 0.967896 | 3.411925 |
66dffbd8-3cb8-4b7b-8514-3163578978a9 | pratik-hanmante/CPP | 16.09.2023/AlphabatesPattern.cpp | #include <iostream>
using namespace std;
int main(){
int row;
cout<<"Enter a how many rows you want: ";
cin>>row;
char ch='A';
for(int i=1;i<=row;i++){
for(int j=1;j<=i;j++){
cout<<ch<<" ";
}
cout<<endl;
ch=ch+1;
}
return 0;
}
| ALGO | 0.993327 | 3.741247 |
d9ba2862-58b5-4aee-885d-9a45ac876af7 | ash1526/CodeLibrary | cf-B - Prime Square - code.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define all(s) s.begin(),s.end()
#define rep(i, a, b) for(ll i = a; i < b; i++)
#define _max(v) *max_element(v.begin(), v.end())
#define _min(v) *min_elem... | ALGO | 0.999115 | 3.097873 |
ef0a35dd-89cb-43a4-a1f5-cb714e66eeff | RyanL123/Competitive-Programming | USACO/Training/gift1.cpp | /*
ID: ryan.li2
TASK: gift1
LANG: C++
*/
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef vector<pair<int, int>> vii;
typedef vector<int> vi;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
#define pb(x) push_back(x)
#define mp(a, b) make_pair(a, b)
#defin... | ALGO | 0.998833 | 3.600105 |
c5d9a931-9a31-421e-b46e-f4dbfc6d262a | danyuanwang/XuanWuGame_C | boost/libs/compute/example/batched_determinant.cpp | #include <iostream>
#include <Eigen/Core>
#include <Eigen/LU>
#include <boost/compute/function.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/transform.hpp>
#include <boost/compute/container/vector.hpp>
#include <boost/compute/types/fundamental.hpp>
namespace compute = boost::compute;
//... | ALGO | 0.999885 | 6.384509 |
7aa15afd-a0ba-4f9c-96d9-16256113e3c2 | ishandutta2007/codeforces | yfhuang/normal/596/C.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
const int maxx=100000+16;
int a[maxx],b[maxx];
int c[maxx];
int h[maxx];
int n;
int w[maxx];
int findval(int x,int y,int val){
while(y>x){
int mid=(x+y)/2;
if(a[mid]<=val) y=mid;//val
else x=m... | ALGO | 0.999991 | 3.311043 |
11256fa1-b8f8-433c-ae51-af409048e4a6 | akankshadeo/Cpp | program271.cpp | //call by reference
#include<iostream>
using namespace std;
void Swap(int &ino1, int &ino2)
{
int temp;
temp = ino1;
ino1 = ino2;
ino2 = temp;
}
int main()
{
int A = 10;
int B = 11;
Swap(A,B);
cout<<"Data after swapping: \n";
cout<<"Value of A:"<<A<<"\n";
cout<<"Value of B:"<... | ALGO | 0.997325 | 5.029547 |
72ed4915-a85e-4c14-a62c-41a5e64059f5 | phanmanhcuongdev/DSA-PTIT | SortingandSearching/DSA06016-TICH_LON_NHAT_NHO_NHAT.cpp | #include<iostream>
#include<set>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n,m;
cin >> n>>m;
vector<int> N(n);
int max;
for (int i = 0; i < n; i++) {
cin >> N[i];
if (i == 0) {
max = N[i];
}
else {
if (N[i] ... | ALGO | 0.999973 | 3.024232 |
de71446c-e75d-49a2-a982-9bb727053da6 | omkarlhr9595/IMCC | Flutter 2025/projects/calculator/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.996124 | 6.76775 |
f49cc399-9150-4972-9272-8a14bb70a078 | Andrew-Velox/XPSC | WEEK - 06/DAY - 04/Factory_Machines.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef velox
#include "debug.h"
#else
#define debug(x...)
#endif
#define ll long long
#define srt(v) sort(v.begin(),v.end())
#define grtsrt(v) sort(v.begin(),v.end(),greater<ll>())
#define unq(v) v.erase(unique(v.begin(),v.end()),v.end())
#define rev(v) reverse(v.begin(),... | ALGO | 0.999993 | 4.137406 |
294797c8-934b-4d01-9bf3-e3a6ecc7eb9f | AayushSharma54652/DSA-Practice | 5) Recursion/functional way to print sum of n numbers.cpp | #include<bits/stdc++.h>
using namespace std;
int sum(int n)
{
if(n == 0) return 0;
return n + sum(n-1);
}
int main(){
int n;
cin>>n;
cout<<sum(n);
return 0;
}
| ALGO | 0.99994 | 4.364714 |
f61aa7a9-87f7-489f-bb58-a6fa42a2d54f | TakayamaMomoya/ShinobiDrift | project/data/BULLETPHYSICS/include/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp | #include "btConvexTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
#include "LinearMath/btQuaternion.h"
#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h"
btConvexTriangleMeshShape ::btConvexTriangleMeshShape(btStridingMeshInterface* meshInterface, bool calcAabb)
... | ALGO | 0.986953 | 7.605254 |
a7b67748-1772-49d3-8dac-1a3b7382c299 | Swami5911/GFG_Code | Medium/Smallest Positive missing number/smallest-positive-missing-number.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
//Function to find the smallest positive number missing from the array.
int missingNumber(int arr[], int n)
{
// Your code here
sort(arr,arr+n);\
int a = 1;
... | ALGO | 0.999831 | 5.593101 |
587dde83-36c5-4853-ad24-be22092f64b1 | ishandutta2007/codeforces | qpedop_muxaujlobu4/normal/1556/C.cpp | #pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,abm,mmx,tune=native")
#include<vector>
#include<iostream>
#include<stack>
#include<cmath>
#include<algorithm>
#include<set>
#include<map>
#include<string>
#include<tuple>
#include<bitset>
#include<queue>
#include<... | ALGO | 0.999984 | 3.88475 |
af9d74ff-6cde-4dba-b67e-f3f38fc69325 | Izana180/atcoder | abc/abc100/a.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
if (A <= 8 && B<= 8){
cout << "Yay!" << endl;
}
else{
cout << ":(" << endl;
}
return 0;
} | ALGO | 0.998594 | 3.490157 |
de1b2dbd-0fc6-4352-a695-16c91a1eabbb | Johniel/contests | codeforces/e81/A/main.cpp | // codeforces/e81/A/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << ... | ALGO | 0.999791 | 4.339691 |
40152882-3f0e-4d3c-827e-c7d146cfe770 | hawa920/Competitive-Coding | 581_CompetitiveCoding/Part_II/MaxComponent/max.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
int max_component()
{
int nv, ne, a, b, sum, cur_v, ret;
scanf("%d%d", &nv, &ne);
int w[nv];
bool ifvisit[nv];
stack<int> pile;
vector<int> adjlist[nv];
for(int i = 0; i < nv; i++)
{
scanf("%d", &w[i]);
ifvisit[i] = false;
}
... | ALGO | 0.999942 | 4.157136 |
e759b5b5-6360-437d-8174-e5d9fdd44332 | 2464326176/openCV | mingw-build/opencv-samples/tapi/ufacedetect.cpp | #include "opencv2/objdetect.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/core/ocl.hpp"
#include <iostream>
using namespace std;
using namespace cv;
static void help()
{
cout << "\nThis program demonstrates the cascade recognizer. Now you can use Haar or LBP features.\n"
... | ALGO | 0.946488 | 6.289213 |
ba91333d-13bd-4787-bc4a-62eca346804b | ChristianReyes8/ALSE_labs | Lab8/polinomios/Polinomio.cpp | /**
* Project Untitled
*/
#include "Polinomio.h"
/**
* Polinomio implementation
*/
Polinomio::Polinomio() {
_orden = -1;
_variable ='X';
_polCabeza = NULL;
}
/**
* @param pol
*/
Polinomio::Polinomio(string pol) {
}
/**
* @param pol
*/
Polinomio::Polinomio(Polinomio& pol) {
_orden = pol._or... | TOOL | 0.940806 | 3.547954 |
3ffa16df-daab-411a-a9cb-e988be0489e5 | kitoriaaa/AtCoder | ABC174/ABC174C.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int k;
cin >> k;
int i=0;
bool flag = false;
long long int x = 7;
for (i=1; i <= k; i++) {
x %= k;
if (x == 0) {
flag = true;
break;
}
x = x*10+7;
}
if (flag) cout <<... | ALGO | 0.999069 | 3.62076 |
da08220e-9ec3-4e42-9926-f3b6b8976d99 | MrCryptoBeast/BSTP | src/node/coin.cpp | #include <node/coin.h>
#include <node/context.h>
#include <txmempool.h>
#include <validation.h>
void FindCoins(const NodeContext& node, std::map<COutPoint, Coin>& coins)
{
assert(node.mempool);
assert(node.chainman);
LOCK2(cs_main, node.mempool->cs);
CCoinsViewCache& chain_view = node.chainman->Active... | TOOL | 0.934277 | 6.787049 |
0a7b755f-c6d6-44b0-b747-2c61a53f309f | NayeliBuckridge/KCFcpp | src/runtracker.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "kcftracker.hpp"
#include <dirent.h>
using namespace std;
using namespace cv;
int main(int argc, char* argv[]){
if (argc > 5) return -1;
bool HOG = tru... | TOOL | 0.920278 | 5.498038 |
db16f717-b791-4b63-b5d8-e1490df0f7fa | mr-d-self-driving/GMAT-R2020a-src | src/csaltTester/src/TestOptCtrl/src/pointpath/MoonLanderPathObject.cpp | /**
* Developed based on MoonLanderPathObject.m
*/
//------------------------------------------------------------------------------
#include "MoonLanderPathObject.hpp"
#include "MessageInterface.hpp"
//#define DEBUG_MoonLander_PATH
//------------------------------------------------------------------------------
//... | ALGO | 0.990727 | 5.570815 |
65bf9267-49e5-48c2-b67d-47841201459e | NeoClear/leetcode-archive | FactorialTrailingZeroes/main.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int trailingZeroes(int n) {
int64_t ans = 0;
for (int64_t base = 5; base <= (int64_t)n; base *= 5)
for (int64_t i = base; i <= (int64_t)n; i += base)
ans++;
return ans;
}
};
int main()
{... | ALGO | 0.999868 | 5.822509 |
94e77e47-1d5f-4e60-ae4f-5a247ff2451f | michaelsouza/mmq-jessica | epanet-dev/src/Utilities/segpool.cpp | #include "segpool.h"
#include "Utilities/mempool.h"
#include <iostream>
using namespace std;
//-----------------------------------------------------------------------------
SegPool::SegPool() {
memPool = new MemPool();
freeSeg = nullptr;
segCount = 0;
}
//-----------------------------------------------------... | TOOL | 0.881781 | 4.480362 |
04ed3529-d118-4147-bbb8-ef7561fdaa8f | adhirajChauhan/LPU_BTECH_PEP_2023 | B.tech PEP/DSA/Arrays/Searching/reverseArray.cpp | #include <iostream>
using namespace std;
void reverse(int arr[], int n){
int start = 0;
int end = n - 1;
while(start <= end){
swap(arr[start], arr[end]);
start++;
end--;
}
}
void printArray(int arr[], int n){
for(int i = 0; i < n; i++){
cout << arr[i] << " ";
}... | ALGO | 0.999698 | 5.183244 |
2a60d069-9278-45e6-b650-e71613bf3dc1 | razimantv/leetcode-solutions | Solutions/C/convert-an-array-into-a-2d-array-with-conditions/Solution.cpp | // https://leetcode.com/problems/convert-an-array-into-a-2d-array-with-conditions/
class Solution {
public:
vector<vector<int>> findMatrix(vector<int>& nums) {
unordered_map<int, int> cnt;
for (int x : nums) ++cnt[x];
vector<vector<int>> ret;
for (auto [k, v] : cnt) {
for (int i = 0; i < v; ++... | ALGO | 0.999975 | 6.416518 |
7aaa9915-e9c9-4cf5-beff-9b22d0b577ea | Ashutosh2128/DSA-Placement-Course-By-Love-Babbar | Lec-022. Character Array and String With Leet Code And Code Studio Problem Solve/LenthOfString.cpp | #include <iostream>
using namespace std;
int getLength(char name[20]) {
int count = 0;
for(int i = 0; name[i] != '\0'; i++) {
count++;
}
return count;
}
int main() {
char name[20];
cout << "Enter your name" << endl;
cin >> name;
cout << "Lenth of my name is : " << getLe... | TOOL | 0.934186 | 3.66938 |
6c324999-f742-4c5d-abf7-6d415f419728 | harsh0895/DSA_In_Cpp | Day_51.cpp | // sort a string:-
#include<iostream>
#include<vector>
using namespace std;
int main(){
string str = "bcaaed";
cout<<"before sorting the string is: "<<str<<endl;
vector<int>alpha(26,0);
for( int i=0; i<str.size(); i++ ){
alpha[str[i]-'a']++;
}
string ans;
for( int i=0; i<26; i++ ){... | ALGO | 0.999961 | 4.720836 |
b9aadc15-f1da-4f83-8072-76e4d0f9883d | anhtuta/c-cpp | Re_practicing/EKO.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
#define MAX 1000005
using namespace std;
int N;
long long M;
long long *x;
long long lo=0, hi=0;
void input() {
cin >> N >> M;
x = (long long*)malloc(sizeof(long long)*(N+1));
for(int i=1; i<=N; i++) {
cin >> x[i];
if(hi < x[i]) h... | ALGO | 0.999977 | 3.739069 |
17cdbb29-48a7-4e4c-89b0-55cf7c820fa2 | cocobisc/PS | 백준/1493- 박스 채우기.cpp | #include <bits/stdc++.h>
using namespace std;
pair<int, int> cube[20];
int ans;
void go(int n, int l, int w, int h) {
if(n == -1) {
if(l && w && h) {
cout << -1;
exit(0);
}
return;
}
int cube_len = cube[n].first;
if (l < cube_len || w < cube_len || h < cube_len || !cube[n].second) {
go(n... | ALGO | 0.999962 | 3.807895 |
38afeef7-f51b-42bd-b0eb-f12f31cd253c | rdujardin/Ara | vision/hough.cpp | #include "hough.h"
using namespace std;
using namespace cv;
Hough::Hough(Timer& timer, vector<Vec3f>& circles) : Timable(timer), _circles(circles) {}
void Hough::apply(Mat& src, Mat& dst) {
timerStart();
HoughCircles(src, _circles, CV_HOUGH_GRADIENT, 1, src.rows/4, 100, 15); //100,22
timerStop();
draw(dst);
}
v... | ALGO | 0.872869 | 5.484265 |
c09237dd-530e-472a-b60e-396d4b542a23 | ashuvictor/Data-Structures-and-Algorithms | Graph_Basic/dijikstraAlgorithm.cpp | /*Implementing Dijkstra Algorithm
https://practice.geeksforgeeks.org/problems/implementing-dijkstra-set-1-adjacency-matrix/1/?page=1&difficulty[]=1&category[]=Graph&sortBy=submissions
*/
vector<int> dijkstra(vector<vector<pair<int, int>>> &adj, int src) {
int V = adj.size();
// Initialize distance vector and... | ALGO | 0.99996 | 6.03022 |
ca0dd83a-e83f-47e7-9483-58897d3e0ad3 | AlexGrim12/cpcfi | 800/sum.cpp | #include <bits/stdc++.h>
using namespace std;
void solve()
{
// Add your solution here
int a, b, c;
bool flag = false;
cin >> a >> b >> c;
if (a + b == c)
flag = true;
else if (a + c == b)
flag = true;
else if (c + b == a)
flag = true;
if (flag)
cout <<... | ALGO | 0.999961 | 5.035811 |
b8d3b0b6-6561-4b08-9f1f-b6ca5ebea578 | literate-t/algol | baek/search_maze.cpp | #include <cstdio>
#include <queue>
using namespace std;
int main()
{
int N, M;
scanf("%d%d", &N, &M);
int row[] = { 0, 1, 0, -1 };
int col[] = { 1, 0, -1, 0 };
char temp[100];
int map[102][102];
int dist[102][102];
bool visited[102][102];
for (int i = 1; i <= N; ++i)
{
scanf("%s", temp);
for (int j = 0;... | ALGO | 0.999891 | 3.578791 |
2cb75fa5-8d9a-40a1-9fc1-7720b3c4c9c5 | TheOneForce/Stepik | 363-YandexIntroToCPP/1_10 - Strings and Characters/5.cpp | /*
A single character is entered, change its case. That is, if a lowercase letter was entered, capitalize it and vice versa. Characters that are not a Latin letter must be displayed unchanged.
Input
A single character is entered.
Output
Display the answer to the problem.
*/
#include <iostream>
using namespace std;
i... | ALGO | 0.978106 | 4.734339 |
a9eeb471-e22e-4a01-b1a1-3d6147b50cbe | Deba951/CPP | 14.3.cpp | /* C program to count the number of even and odd elements in an array */
#include <stdio.h>
int main()
{
printf("Enter the number of integers you want to calculate");
int n;
scanf("%d",&n);
int arr[n];
printf("Enter the numbers one by one:");
for(int i = 0; i < n; i++)
scanf("%d",&arr[i]);
int count_odd =0, count_ev... | ALGO | 0.998728 | 4.840766 |
bc6652be-8105-46bb-b7e4-d5bcc439a049 | CoderSwarup/DSA_Mastery | 8_Arrays/Questions/4_Intersection_of_two_array.cpp | #include<iostream>
using namespace std;
#include<vector>
/*
Sample Input 1 :
2
6 4
1 2 2 2 3 4
2 2 3 3
3 2
1 2 3
3 4
Sample Output 1 :
2 2 3
3
*/
// UnOptimize approach
vector<int> findArrayIntersection(vector<int> &arr1, int n, vector<int> &arr2, int m)
{
// Write your code here.
vector<int> ans;
for(int i=0;i... | ALGO | 0.999982 | 4.168824 |
aae0a442-3ac2-4f0f-a569-ff80987f2a35 | sh-arka22/LeetcodeContest | Weekly Contest 317/B.cpp | class Solution {
public:
vector<vector<string>> mostPopularCreator(vector<string>& creators, vector<string>& ids, vector<int>& views) {
unordered_map<string, long long> mp;
unordered_map<string, pair<int, string>> imp;
long long mx = -1;
for(int i = 0; i < creators.size(); +... | ALGO | 0.999843 | 6.167303 |
92fa1140-23a5-4083-8018-75c5901ceec7 | 21A91A05F1/Owl_coding | O3_Valid Parentheses.cpp | #include<bits/stdc++.h>
using namespace std;
int fun(stack<char>st,string s)
{
for(int i=0;i<s.size();i++)
{
if(s[i]=='(' or s[i]=='{' or s[i]=='[') st.push(s[i]);
else
{
if(st.empty())
{
return 0;
}
if(s[i]==')' and st.top()... | ALGO | 0.999845 | 4.826151 |
7ff94198-c945-4795-85d3-1d8605e8e562 | Manvityagi/Codechef-Codeforces-spoj | codechef/CookOff/July Cookoff/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define F first
#define S second
#define MP make_pair
#define LL long long
#define ULL unsigned long long
#define LB lower_bound
#define MOD1 1000000007
#define MOD2 1000000009
#define loop(i, a, b) for (int i = a; i < b; i++)
LL n, m;
int movex[] = {0... | ALGO | 0.999991 | 4.988625 |
3cac65b6-0679-4e80-a872-3bac21742d96 | darcangelomauro/RFL | source/action.cpp | #include "geometry.hpp"
using namespace std;
using namespace arma;
double Geom24::calculate_S_from_dirac() const
{
cx_mat dirac = build_dirac();
cx_mat dirac2 = dirac*dirac;
double trdirac2 = trace(dirac2).real();
double trdirac4 = trace(dirac2*dirac2).real();
return g2*trdirac2 + trdirac4;
}
dou... | ALGO | 0.993546 | 5.657245 |
90c3288a-16a7-4eeb-9d75-82f39438d495 | crazynoodle/hello-world | demo/plain_crack.cpp | #include <unistd.h>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <vector>
#include <sys/utsname.h>
#include <pthread.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sstream>
#include <sys/wait.h>
#include <memory>
#include <sys/types.h>
#include <fstream>
#include <string>
#include <sys/time.h... | TOOL | 0.888732 | 3.17728 |
3b411a3d-30ac-48f2-8992-7b447338ea30 | megait004/28tech-oj | ham/hambasic8.cpp | #include<iostream>
using namespace std;
bool so_dep(int n);
bool so_dep(int n){
int demle = 0 ;
int demchan = 0;
for(int i = 0 ; n > i ; (n = n /10)){
if(n % 2 ==0 ){
demchan ++;
}
else if(n % 2 !=0){
demle++;
}
}
if(demchan == demle){
return true;
}
else
return false;
}
int main(){
int n; ... | ALGO | 0.999957 | 3.87498 |
97e9a6a3-ec94-4cda-b55e-7ea796fb9dfa | FUNCoderAdmin/AtCoder | abc/abc366/b/solution_1.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<string> S(N);
int M = 0;
for (int i = 0; i < N; i++){
cin >> S[i];
M = max<int>(M, S[i].size());
}
vector<string> T(M, string(N, '*'));
for (int i = 0; i < N; i++) {
int L = S... | ALGO | 0.999992 | 3.819582 |
9a8fc6de-9eae-4be7-b470-17a6b23a98ac | eclipse-oniro-mirrors/wukong | common/src/wukong_util.cpp | #include "wukong_util.h"
#include <climits>
#include <dirent.h>
#include <fstream>
#include <iostream>
#include <memory.h>
#include <sstream>
#include <sys/stat.h>
#include "display_manager.h"
#include "if_system_ability_manager.h"
#include "iservice_registry.h"
#include "launcher_service.h"
#include "png.h"
#include... | TOOL | 0.888587 | 6.04055 |
be2b4a5d-d9ab-4eca-ac79-11cb3614d657 | dipu-37/DSA_ALGO_ALL | arr/spiral_traversal_of_matrix.cpp | #include<bits/stdc++.h>
using namespace std;
vector<int> printSpiral( vector<vector<int>>&mat)
{
vector<int>ans;
int n = mat.size();
int m = mat[0].size();
int top =0,left = 0, bottom = n-1, right = m-1;
while(top<=bottom && left <= right)
{
///right
for(int i=left; i<=right; ... | ALGO | 0.999996 | 3.588775 |
a3fd0766-af68-47f1-8d61-d1c56b4ff5c9 | iqlimahattyyatullatifah/app_funs-master | 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.998762 | 6.786404 |
e95e4faa-20a8-4219-9c48-48cf3c5c8668 | Yash-Gupta001/PROB-main | c++/eligible_to_vote.cpp | #include <iostream>
using namespace std;
int main() {
int age;
cout <<"Enter your age-: "<< endl;
cin >> age;
if (age >= 18){
cout << "You are eligible to vote";
}
else{
cout << "you are underage"<<endl;
}
if (age < 18){
cout << "you need to wait for "<< 18 - age <<... | TOOL | 0.955698 | 4.156229 |
fe0b1889-f465-42cc-802a-a345093511c9 | Rxdgxn/leet | src/867.cpp | #include "../include.h"
class Solution {
public:
vector<vector<int>> transpose(vector<vector<int>>& matrix) {
const int rows = matrix.size(), cols = matrix[0].size();
auto trans = vector<vector<int>>(cols, vector<int>(rows));
for (int i = 0; i < rows; i++)
for (int j = 0; j < ... | ALGO | 0.999786 | 6.747489 |
3d922113-e1a3-4f09-821f-3fbc852349d1 | aliciacilmora/dsa_solutions | cses/permutations.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int input;
cin >> input;
if(input == 1){
cout << 1;
}
else if(input == 2 || input == 3) cout << "NO SOLUTION";
else{
for(int i=input-1; i>0; i-=2){
cout << i << " ";
}
for(int i=input; i>0; i-=2... | ALGO | 0.999989 | 3.677489 |
a5184cd5-5427-4e6b-8910-0618558627db | IamRash-7/LeetCode | 138-copy-list-with-random-pointer/138-copy-list-with-random-pointer.cpp | /*
// Definition for a Node.
class Node {
public:
int val;
Node* next;
Node* random;
Node(int _val) {
val = _val;
next = NULL;
random = NULL;
}
};
*/
class Solution {
public:
Node* copyRandomList(Node* head) {
Node* org = head;
map<Node*, Node*> mp;
... | ALGO | 0.996005 | 5.413036 |
c6386d65-557f-4d2b-8c57-d4352c377462 | LEE026/baekdu | baekjoon/보석도둑_1202.cpp | #include<iostream>
#include<vector>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
int main(void) {
cin.tie(NULL);
ios::sync_with_stdio(false);
cout.tie(NULL);
int n, k;
cin >> n >> k;
vector<pii> arr(n);
map<int,int> c;
fo... | ALGO | 0.999987 | 3.703981 |
b9fee2f7-8e37-4a4a-9320-b1b77e45cc5b | zakhenry/particle-game | src/particleAttractor.cpp | #include "particleAttractor.h"
ParticleAttractor::ParticleAttractor(int newX, int newY, float newRange, int newColor){ //constructor
// cout << "Particle attractor created \n";
posX = newX;
posY = newY;
range = newRange;
color = newColor;
}
float ParticleAttractor::angleBetweenAngles(float a... | ALGO | 0.988401 | 5.813992 |
43a46447-fb24-4574-b0f5-b0d69a94e25f | JingyangOu/ICS1-2022-Fall-RUC | BugLab/buglab-handout/fixed/polycalc.cpp | #include <iostream>
#include <cmath>
typedef unsigned ElemTypeA;
typedef float ElemTypeB;
struct Node {
ElemTypeA exp;
ElemTypeB base;
Node() = default;
Node(ElemTypeA e, ElemTypeB b) : exp(e), base(b) {}
};
ElemTypeB calcOnce(Node node);
ElemTypeB calc();
int main() {
ElemTypeB result = calc()... | ALGO | 0.998681 | 4.154624 |
fd5087b4-bd4f-4cd2-b3ce-e56904d534f5 | ishandutta2007/codeforces | risujiroh/normal/1102/D.cpp | #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
tem... | ALGO | 0.999982 | 4.748085 |
eff7c8cc-f138-4614-ba2a-67bcbd613bcf | daidai411411/AtCoder | ABC345/B.cpp | #include <stdlib.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
long long n;
cin >> n;
if (n % 10 == 0) {
cout << n / 10 << endl;
} else if (n > 0) {
cout << n / 10 + 1 << endl;
} else {
... | ALGO | 0.999804 | 3.095048 |
96a955a3-2515-441d-9428-c5ccd6494e51 | egrcc/leetcode | wrong/add-binary.cpp | class Solution {
public:
string addBinary(string a, string b) {
int p = 0, q = 0;
for (int i = a.length() - 1; i >= 0; i--) {
if (a[i] == '1') {
p += pow(2, i);
}
}
for (int i = b.length() - 1; i >= 0; i--) {
if (b[i] == '1') {
... | ALGO | 0.999967 | 6.342191 |
eb958971-538c-4fc3-b1f5-8b08bfce5c2b | aarindey/Leetcode-Solution-By-aarindey | contains-duplicate-ii/contains-duplicate-ii.cpp | class Solution {
public:
bool containsNearbyDuplicate(vector<int>& nums, int k) {
unordered_map<int,vector<int> > mp;
for(int i=0;i<nums.size();i++)
{
mp[nums[i]].push_back(i);
}
for(auto pr: mp)
{
if(pr.second.size()>1)
{
... | ALGO | 0.999964 | 5.943592 |
14b326ad-f2e7-49b6-9914-857e6a208b09 | CDPS/Competitive-Programming | Codeforces/Practice/1561 C Deep Down Below.cpp | #include <bits/stdc++.h>
using namespace std;
struct node{
int x, r;
node(int x,int r): x(x), r(r){}
bool operator < (const node &a)const{
if(x==a.x)
return r > a.r;
return x < a.x;
}
};
int main(){
cin.sync_with_stdio(false); cin.tie(NULL);
int t,n,m,x;
cin ... | ALGO | 0.999893 | 3.772862 |
d04a0863-0f56-4e3b-8489-0332727d83f8 | azlatepodani/Code | final/algorithms/test.cpp | #include <iostream>
#include <sstream>
#include "selection.h"
using namespace std;
using namespace azp;
template <typename T, int K>
string write(array<T, K> a, T end) {
stringstream ss;
for (auto& e : a) {
if (e != end) {
ss << *e << ", ";
}
else {
ss << -1 << ", ";
}
}
return ss.str();
}
void... | ALGO | 0.995382 | 4.451637 |
c3799c02-8463-427d-bed6-02da07ff471d | Menwitz/HumanoidOS | src/gnu/llvm/llvm/lib/CodeGen/StackSlotColoring.cpp | #include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveInterval.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/LiveStacks.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "... | ALGO | 0.977349 | 7.798462 |
7c00d533-ed13-477b-8ea0-990fcad0b1fa | n-r-w/zf_item_view | hyphenator/hyphenatorfast.cpp | #include "hyphenatorfast.h"
namespace Hyphenation
{
const QString HyphenatorFast::_x = QString::fromUtf8("йьъ");
const QString HyphenatorFast::_g = QString::fromUtf8("аеёиоуыэюяaeiouy");
const QString HyphenatorFast::_s = QString::fromUtf8("бвгджзклмнпрстфхцчшщbcdfghjklmnpqrstvwxz");
HyphenatorFast::HyphenatorFast()
... | ALGO | 0.99083 | 5.313346 |
97aaaef9-fbc6-4982-b9dd-91c9cdcdf5e9 | Ching-Ting-Wei/Quantum | src/Request/Request.cpp | #include"Request.h"
Request::Request(int source, int destination, const int& time_limit):source(source),
destination(destination), time_limit(time_limit), status(REQUEST_UNFINISHED), send_path_length(0){
if(DEBUG)cerr<<"new Request"<<endl;
}
Request::Request(int source, int destination, const int& time_limit,... | ALGO | 0.973834 | 3.877192 |
0089ea42-360e-480f-9b5c-52c48e05e725 | Namchee/ngel33t | probs/1249.cpp |
#include <string>
#include <stack>
using namespace std;
class Solution {
public:
string minRemoveToMakeValid(string s) {
string result;
stack<int> stk;
for (int i = 0; i < s.length(); i++) {
char c = s[i];
if (c == '(') {
stk.push(i);
... | ALGO | 0.999937 | 5.945732 |
7330191f-eff6-4a5e-808a-97592656ed10 | AnthonyDugarte/competitive-programming | SPOJ/MIXTURES.cpp | #include <bits/stdc++.h>
using namespace std;
template <typename T>
void f_cout(T val) { cout << val << "\n"; }
template <typename T, typename... TT>
void f_cout(T val, TT... tail) { cout << val << " : ", f_cout(tail...); }
int t{1}, n;
int mixs[100];
constexpr int INF{100 * 100 * 100};
tuple<int, int64_t> memo[100... | ALGO | 0.99974 | 3.949755 |
ee3b3dee-a79d-48a9-a363-879f90bc1fa7 | stark1024/Mark1 | pro1.cpp | // swapping two no.(s) using XOR operations
#include <iostream>
using namespace std;
void swap(int *x, int *y){
*x = *x ^ *y;
*y = *x ^ *y;
*x = *x ^ *y;
}
int main(){
int a = 2;
int b = 3;
int *l;
l = &a;
int *m;
m = &b;
cout<<*l<<endl<<*m;
swap(*l, *m);
cout<<*l<<endl<<*m;
return 0;
}
| ALGO | 0.999421 | 3.862807 |
13ad938d-b527-4d42-b0ad-0e3fc5a62474 | NigeleM/SchoolProjects | Algorithm/MergeSort.cpp | #include <cstdlib>
#include <iostream>
#include <climits>
using namespace std;
/*
*
*/
typedef int Data;
void mergeSort(Data A[], int p, int r);
void merge(Data A[], int p, int q, int r);
int main(int argc, char** argv) {
Data *A;
int N;
cout << "Enter the number of data" << endl;
cin >> N;
A... | ALGO | 0.999856 | 3.953599 |
213ac528-c152-4acf-80b7-7aaa9680103b | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_7229_7.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, count = 0;
cin >> n >> m;
for (; n > 0, m > 0;) {
n = n - 1;
m = m - 1;
count++;
}
if (count % 2 == 0)
cout << "Malvika";
else
cout << "Akshat";
}
| ALGO | 0.999975 | 3.336716 |
d2772a81-d4a3-457d-8887-cb96d8651921 | juruohejiarui/OI | training2020.8.30/T1.cpp | #include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#define LL long long
using namespace std;
const int maxn = 1e6 + 5;
LL ls[maxn], ls_cnt;
void init() {
for (LL i = 1; 3 * i * i - 3 * i + 1 <= (LL)1e11; i++)
ls[i] = 3 * i * i - 3 * i + 1, ls_cnt++;
}
void solve() {
LL N, ans =... | ALGO | 0.998943 | 3.638085 |
0c437287-8617-482f-8dd9-48050bbd4348 | dapengchen1234/openvino_dev | src/core/src/op/util/topk_base.cpp | #include "openvino/op/util/topk_base.hpp"
#include <limits>
#include <ngraph/validation_util.hpp>
#include <topk_shape_inference.hpp>
#include "itt.hpp"
#include "openvino/op/util/precision_sensitive_attribute.hpp"
namespace {
constexpr auto UNKNOWN_NORMALIZED_AXIS = std::numeric_limits<uint64_t>::max();
}
ov::op::... | ALGO | 0.968713 | 7.730687 |
2e0f01be-72d7-4ffc-a492-e93446cbe964 | ll06printf/TravelByPlan-xCPC | CCPC/The 2nd Universal Cup Stage 25 Shenzhen/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define For(i,a,b) for (int i = (a), i##__end = (b); i <= i##__end; ++i)
#define Ford(i,a,b) for (int i = (a), i##__end = (b); i >= i##__end; --i)
typedef long long ll;
typedef long double lf;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#def... | ALGO | 0.999846 | 4.431276 |
0a156ad0-524e-4dff-9fd8-fe992311ef5b | chris-romanov/os | contrib/llvm-project/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp | #include "llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/COFFImportFile.h"
#include "llvm/Object/COFFModuleDefinition.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/O... | TOOL | 0.880753 | 7.567533 |
116cb9f2-4f14-49d7-bf9c-b8b71087e9ee | MakinoRuki/Codeforces | R730/1543B.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <cmath>
#include <queue>
#include <time.h>
#define eps 1e-7
#define M 22
#define N 200005
#define SZ 200000002
using n... | ALGO | 0.999829 | 3.851327 |
0534ae2a-d40c-4b57-bde1-a4dd612ee51b | quangh33/Coding-Interview-Practice | Leetcode/data structure/ordered_map, set/352. Data Stream as Disjoint Intervals.cpp | //
// Created by Hoang, Quang on 2019-12-01.
//
class SummaryRanges {
set<int> s;
public:
/** Initialize your data structure here. */
SummaryRanges() {
s = set<int>();
}
// O(log n)
void addNum(int val) {
s.insert(val);
}
// O(n)
vector <vector<int>> getIntervals()... | ALGO | 0.999814 | 6.296371 |
17a2957a-6b3e-4155-8911-471bb7b8d3fd | guragurayasako/argo | topic8/8c_txt.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
using namespace std;
struct Node {
int key;
Node *right, *left, *parent;
};
Node *root, *NIL;
Node *treeMinimum(Node *x) {
while (x->left != NIL)
x = x->left;
return x;
}
Node *find(Node *u, int k) {
while (u != NIL && k != u->key) {
if (k... | ALGO | 0.999967 | 4.382634 |
046de22d-9522-4887-8f58-5a6b344228ea | kunal26das/codes | Mathematics/Collatz Conjecture/Collatz Conjecture.cpp | #include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
int c,j,i=1;
while(i)
{
c=0;
j=i;
cout<<"\n ";
cout<<i<<" -> ";
while(j>1)
{
c++;
cout<<j<<", ";
if(j%2) j=(j*3)+1;
else j/=2;
}
... | ALGO | 0.999845 | 3.80738 |
c5f68e5f-d5a7-4ab3-8356-9597c3dd3378 | PrathamJha1/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.999971 | 6.136076 |
8de623f2-f7d9-41ce-b2ca-026c73fec2d0 | jupv4s/curso_metodos_numericos | ejercicios_codigo/evaluaciones/2024_prueba_3_recuperativa/spline.cpp |
#include "spline.h"
#include <cmath>
#include <fstream>
#include <stdexcept>
// Métodos de acceso para los extremos del dominio
double Spline::getXmin() const { return x[0]; }
double Spline::getXmax() const { return x[n]; }
// constructor que carga los datos desde un archivo y construye el spline
Spline::Spline(con... | TOOL | 0.98023 | 6.072516 |
6acbc5fd-0150-43a0-b4b8-48197801c541 | AllenHuangGit/ompl-1.6.0 | src/ompl/geometric/planners/rrt/src/TSRRT.cpp | /* Author: Ryan Luna */
#include "ompl/geometric/planners/rrt/TSRRT.h"
#include "ompl/base/goals/GoalSampleableRegion.h"
#include "ompl/tools/config/SelfConfig.h"
#include <limits>
ompl::geometric::TSRRT::TSRRT(const base::SpaceInformationPtr &si, const TaskSpaceConfigPtr &task_space)
: base::Planner(si, "TSRRT"), ... | ALGO | 0.999196 | 7.498952 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.