uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
acba8d77-52d1-47f0-8256-a954b65907b8 | hyeokbini/programmers-baekjoon | 프로그래머스/1/133499. 옹알이 (2)/옹알이 (2).cpp | #include <string>
#include <vector>
using namespace std;
int solution(vector<string> babbling) {
int answer = 0;
for(auto i : babbling)
{
int check = 0;
bool ans = true;
for(int j = 0; j < i.length(); j++)
{
if(i.substr(j,3) == "aya" && check != 1)
{... | ALGO | 0.997985 | 4.933743 |
2ea5b663-e15c-43c0-a3cc-18aab78fca6b | cwang588/algorithms | ccpc2020/1010.cpp | #include<bits/stdc++.h>
using namespace std;
int a[55];
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
for(int i=1;i<=n;++i)scanf("%d",&a[i]);
bool ky=true;
for(int i=2;i<=n;++i)
{
if(a[i]==a[i-1])
{
ky=false;
break;
}
}
if(ky)printf("YES\n");
else printf... | ALGO | 0.999884 | 3.923995 |
f7375f6e-2861-4709-9f36-5f712f345acd | 192210300/csa0636-daa | fibonacci.cpp | #include <stdio.h>
// Function to print Fibonacci series using recursion
int fibonacci(int n) {
if (n <= 1)
return n;
else
return fibonacci(n - 1) + fibonacci(n - 2);
}
// Function to print Fibonacci series with addition showing
void printFibonacciWithAddition(int n) {
int i;
for (i = ... | ALGO | 0.998936 | 5.33886 |
302b6d5c-a1f0-4642-9bd8-e9e1c3bf2b28 | Rohith-Rao/DSA-codes | linkedlist/ccc t1 24-9 alternating rearranging.cpp | #include <iostream>
using namespace std;
struct node
{
int data;
node *next;
};
typedef struct node *lptr;
void print(lptr p)
{
if (p==NULL)
{ cout<<endl;
return;
}
cout<<p->data<<" ";
print(p->next);
}
void addend(lptr &p,int n)
{
lptr T;
T=new(node);
T->data=n;
T->next=NULL;
if(p==NULL)
{
... | ALGO | 0.999918 | 3.742755 |
85b2f3ab-78ca-49de-9ab2-02c339b6f80d | Bhavik1603/My-Leetcode-Solutions | My Leetcode Solutions/Make Array Zero by Subtracting Equal Amounts/Make Array Zero by Subtracting Equal Amounts.cpp | // https://leetcode.com/problems/make-array-zero-by-subtracting-equal-amounts
class Solution {
public:
int minimumOperations(vector<int>& nums) {
sort(nums.begin(),nums.end());
nums.erase(unique(nums.begin(),nums.end()),nums.end());
int steps=0;
for(int i=0;i<nums.size();i++)
... | ALGO | 0.999933 | 5.93467 |
e0c98945-0e3e-415a-8849-7ecf0da1474a | moondemon68/cp | ITEBE/Kontes4/gcd.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define pii pair<int,int>
#define LL long long
using namespace std;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a,b,c,d;
cin >> a >> b... | ALGO | 0.999991 | 3.9328 |
fce720f0-2ca4-4420-a027-2361bfc64c8d | ishandutta2007/codeforces | sirrembocodina/normal/1097/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
typedef long long ll;
int mod = 1000000007;
string s[100100];
bool is[100100];
int cnt[500100];
int B[100100];
int MN[100100];
int main()... | ALGO | 0.999541 | 4.005918 |
a60afb31-5728-415b-9268-f45c5ae81f81 | prprprpony/oj | uva/1439.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 15;
const int MAXM = 112;
bool connected[1 << N];
int dp[1 << N];
int choice[1 << N];
char x[MAXM], y[MAXM];
int lvl[N];
int main()
{
int M;
while (scanf("%d", &M) == 1) {
fill_n(connected, 1 << N, false);
fill_n(dp, 1 << N, N + 426);
for (int i = 0; i... | ALGO | 0.999965 | 3.079756 |
1a9648ad-10c7-46a8-a503-e6b36f5a7fd2 | denis-gubar/Leetcode | all/2109. Adding Spaces to a String.cpp | class Solution {
public:
string addSpaces(string s, vector<int>& spaces) {
string result;
int N = s.size(), M = spaces.size();
result.reserve(N + M);
int i = 0, j = 0;
while (i < N || j < M)
{
if (j < M && spaces[j] == i)
{
result += ' ';
++j;
continue;
}
result += s[i];
++... | ALGO | 0.999816 | 6.085901 |
3ff8b0ea-3f0f-47dc-8e83-4975ba954640 | lasjg72/CompetetiveProgramming | program/Atcoder/ARC/ARC104/B.cpp | #include <iostream>
#include <algorithm>
#include <tuple>
#include <vector>
#include <string>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <cassert>
using namespace std;
using ll = long long;
int main()
{
int n;
cin >> n;
string s;
cin >> s;
map<char, int> c;
ll ans... | ALGO | 0.999855 | 5.389208 |
8ca31e2a-dc77-4919-84f2-25608fc552dd | jyshnkr/interview-practice-exercises-failedattemps-leetcode-hackerrank-and-so-much-more | moreExcitingProblems.cpp | /*
* Matrix Cells in Distance Order,
* Find Customer Referee
* Nested List Weight Sum
*/
#include <vector>
#include <string>
#include <iostream>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <sstream>
#include <algorithm>
#include <multimap>
/*
SELECT name FROM customers WHERE REF_ID ... | ALGO | 0.999428 | 5.006177 |
c1d04c58-512a-4a8a-8ba9-9a70b7df0742 | agharsh53/Amazon_Clone | 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.998733 | 6.76775 |
010dd8c2-1884-4b9d-84b8-630769fceebd | Chinmayg-10/Dsa-Codes | Basic Codes/RowWiseSum.cpp | #include<iostream>
using namespace std;
void rowWiseSum(int arr[][4],int r,int c){
for(int i=0;i<r;i++){
int sum=0;
for(int j=0;j<c;j++){
sum+=arr[i][j];
}
cout<<sum<<endl;
}
}
int main(){
int arr[3][4]={
{10,11,12,13},
{21,22,23,24},{
... | ALGO | 0.999541 | 3.854277 |
8fd1672b-27d9-4e55-9c22-f8b5fdaafc08 | eladn/swift-deferred-snapshots-rc-gc | lib/LLVMPasses/LLVMMergeFunctions.cpp | #include "swift/LLVMPasses/Passes.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Utils/FunctionComparator.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/Hashing.h"
#includ... | TOOL | 0.976131 | 5.148414 |
91c1d0f3-8302-42e2-822e-60c8b619d6c8 | dafer45/TBTK | Lib/src/SpecializedSolvers/RPA/SusceptibilityCalculator.cpp | /** @file SusceptibilityCalculator.cpp
*
* @author Kristofer Björnson
*/
#include "TBTK/Functions.h"
#include "TBTK/RPA/SusceptibilityCalculator.h"
#include "TBTK/UnitHandler.h"
#include <complex>
#include <iomanip>
using namespace std;
//const complex<double> i(0, 1);
namespace TBTK{
SusceptibilityCalculator... | ALGO | 0.998 | 5.746026 |
10202f2c-35f6-4225-a2b1-e1cdbc1b2c9d | gds1110/Saga | Source/Saga/AI/Service/BTS_FindTarget.cpp | #include "AI/Service/BTS_FindTarget.h"
#include "AI/SAAI.h"
#include "AIController.h"
#include "NavigationSystem.h"
#include "BehaviorTree/BlackboardComponent.h"
#include "Character/CharacterBase.h"
#include "Grid/Grid.h"
#include "Grid/GridManager.h"
#include "AStar/AstarActorComponent.h"
#include "AI/SpawnAIControlle... | ALGO | 0.983824 | 5.604715 |
ae9d33a4-7ecf-4487-8033-dbe3b81b6aba | CoderDream/java-architect-util | hello-algo/hello-algo-main/en/codes/cpp/chapter_searching/hashing_search.cpp | /**
* File: hashing_search.cpp
* Created Time: 2022-11-25
* Author: krahets (<EMAIL>)
*/
#include "../utils/common.hpp"
/* Hash search (array) */
int hashingSearchArray(unordered_map<int, int> map, int target) {
// Hash table's key: target element, value: index
// If the hash table does not contain this k... | ALGO | 0.999807 | 5.811071 |
79ca5cb6-09db-43ba-8d08-1de53e1c2466 | pinak22dhir/Coding-Wallah-by_pinak- | lecture 25/array_as_pointer.cpp | #include<iostream>
using namespace std;
void process(int *arr,int n){
for(int i=0;i<n;i++){
cout<<*(arr+i)<<"\n";
}
}
int main(){
int arr[3]={1,2,3};
process(arr, 3);
return 0;
} | ALGO | 0.992175 | 4.068041 |
1712f15b-3490-42ba-8e8b-d6019706f742 | manikanta2901/ubuntu | .history/SRM/Implementations.cpp/Trees/BinaryTrees/Input_20201126150334.cpp | #include<bits/stdc++.h>
using namespace std;
struct node{
int data;
node *left;
node *right;
};
struct node* create(int data){
struct node* temp = new node();
temp->data = data;
temp->left = NULL;
temp->right = NULL;
}
void insert()
int main(){
struct node *root = NULL;
root = cr... | ALGO | 0.999907 | 3.242651 |
a0ae4839-e7ae-4cd4-a993-061cac0068bb | Arif-Rahman-Sikder/ICPC-Assiut-University-Community-Problemset | Sheet #2 (Loops)/G_Factorial.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
int fac = 1;
for (int i = 1; i <= n; i++)
{
fac = fac * i;
}
cout << fac << endl;
}
return 0;
}
// normal way to find factorial
#include <bits/stdc++.h>
using names... | ALGO | 0.99999 | 5.779824 |
2199457a-cfe9-4522-a184-05e9aa1094ae | GipsyPotter/PTNK | bt co ban/29.cpp | #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
float a,b,c,d,x,x1,x2;
cin>>a>>b>>c;
cout<<setprecision(2)<<fixed;
if(a==0){
if(b==0){
if(c==0){
cout<<"A";
}else{
cout<<"E";
}
... | ALGO | 0.999947 | 3.807871 |
3b283dad-83aa-41eb-b84d-e7b1644fe8c5 | aryansinghal207/Cpp.Codes | tempCodeRunnerFile.cpp | #include<bits/stdc++.h>
using namespace std;
int cop(int a,int b){
int c=0;
for(int i=1;i<=a;i++){
if(a%i==0 && b%i==0){
c=i;
}
}
if(c==1){
return 1;
}
else return 0;
}
int main(){
cout<<cop(22,24);
}
| ALGO | 0.999546 | 4.481313 |
b1da31dc-a00d-4327-bb2e-9007a809af57 | Divesh1602/Leetcode | 0944-delete-columns-to-make-sorted/0944-delete-columns-to-make-sorted.cpp | class Solution {
public:
int minDeletionSize(vector<string>& strs) {
int n=strs.size(),m=strs[0].size();
int ans=0;
for(int a=0;a<m;a++){
for(int i=1;i<n;i++){
if(strs[i][a]<strs[i-1][a])
{
ans++;
break;
... | ALGO | 0.999985 | 6.180932 |
a88fb6b7-6273-4a47-b423-0fadd2967d06 | PositronicsLab/gazebo-course | IK/IKPlanar.cpp | #include <boost/bind.hpp>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/common/common.hh>
#include <gazebo/transport/transport.hh>
#include <gazebo/msgs/msgs.hh>
#include <gazebo/sensors/SensorManager.hh>
#include <gazebo/sensors/RaySensor.hh>
#include <Ravelin/VectorNd.h>
#include <... | ALGO | 0.975104 | 5.315789 |
5c360ea7-b2ef-4f7a-b8df-9f07a52e69fa | Valerion052/codeforces | training/Codeforces_Round/Реализация/1433A/main.cpp | #include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin >> t;
while (t--) {
string x;
cin >> x;
int first = x[0]-'0';
int ans = (first-1)*10;
if (x.size()==1) {ans+=1;}
else if (x... | ALGO | 0.999664 | 5.176702 |
72e8c5e3-0345-42fa-8551-c4f0bcb591bb | anushkawakankar/Handy-Codes | permuteString.cpp | #include <iostream>
using namespace std;
#include <string>
#include <bits/stdc++.h>
void permute(string s, int l, int r,int n)
{
if(l==r && s.length()==n) cout<<s<<" ";
else
{
for(int i = l; i<= r; i++)
{
swap(s[l],s[i]);
permute(s,l+1,r,n);
swap(s[l],s[i... | ALGO | 0.999973 | 5.206558 |
fcdfec0b-7bbe-41f6-909d-29257d3006a6 | govegito/Interview_prep | DSA/binary_trees/boundary_traversal.cpp | vector <int> boundary(Node *root)
{
//Your code here
vector<int> l,lv,r;
l.push_back(root->data);
preorder(root->left,l);
getleaf(root->left,l);
getleaf(root->right,l);
postorder(root->right,l);
return l;
}
void preorder(Node *roo... | ALGO | 0.999927 | 5.369988 |
8783409f-6cc7-4edc-bbc5-d52f998d505c | pandey-kumar/programming | Competative LPU/Recursion/toh.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
void toh(int n,string a,string b,string c){
if(n==0) return;
toh(n-1,a,c,b);
cout<<"move "<<n<<" from "<<a<<" -> "<<c<<endl;
toh(n-1,b,a,c);
}
int main() {
toh(3,"a","b","c");
}
| ALGO | 0.999872 | 4.159317 |
06aa5681-49a3-4eb2-b2cb-2fb855589df0 | GDViper/AlgoTasksCW1 | Task 7/Task7.cpp | #include <iostream>
#include <vector>
#include <stack>
#include <list>
using namespace std;
// Class for a directed graph a using adjacency list
class Graph {
int V; // Number of vertices
list<int> *adj; // Adjacency lists
public:
Graph(int V) { // Constructor
this->V = V;
adj = new list<i... | ALGO | 0.999881 | 6.529711 |
c98c9b35-8281-48f8-977c-38b96b1c9121 | naxocist/naxocist-cp | beta-prog/1024.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
int s = 0;
int n; cin >> n; vector<int> v(n); for(auto &x : v) cin >> x, s += x;
int t = 1e9, B, C;
int a = 0;
for(int i=0; i<n-2; ++i) {
a += v[i];
int b = 0;
for(int j=i+1; j<n-1; ++j) {
... | ALGO | 0.999955 | 4.267243 |
d39e4090-6ade-49e4-8ef2-e372a4d541e3 | kahowang/sensor-fusion-for-localization-and-mapping | 第一章 概述/lidar_localization/third_part/g2o-20170730_git/g2o/examples/calibration_odom_laser/sclam_laser_calib.cpp | #include <iostream>
#include <map>
#include <csignal>
#include <fstream>
#include "g2o/types/sclam2d/types_sclam2d.h"
#include "g2o/types/data/types_data.h"
#include "gm2dl_io.h"
#include "g2o/stuff/macros.h"
#include "g2o/stuff/color_macros.h"
#include "g2o/stuff/command_args.h"
#include "g2o/stuff/filesys_tools.h"
... | ALGO | 0.979977 | 6.109173 |
53b353c4-863c-472c-a4de-44609eac6d54 | genie0000/programmers | 프로그래머스/2/12980. 점프와 순간 이동/점프와 순간 이동.cpp | #include <iostream>
using namespace std;
int solution(int n)
{
int ans = 0;
while ( n > 0)
{
if (n % 2 == 1)
{
ans += 1;
n -= 1;
}
else if (n % 2 == 0)
{
n = n/2;
}
}
cout << ans << endl;
return ans;
} | ALGO | 0.999825 | 4.76737 |
3e11bec9-bb16-4aac-bf7e-b4d08ff8b9d8 | seunghyukcho/algorithm-problems-solved | baekjoon/14698.cpp | #include <iostream>
#include <queue>
using namespace std;
typedef long long ll;
int t, n;
priority_queue<ll> pq;
ll MOD = 1000000007;
ll mul(ll a, ll b)
{
return ((a % MOD) * (b % MOD)) % MOD;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
for(cin >> t; t > 0; t--)
{
ll ans = 1;
if(!pq.empty(... | ALGO | 0.999952 | 4.310969 |
b051b9b0-db30-4e80-8566-3417ba1f40e2 | foto-in/frontend-foto-in | 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 |
7317f99c-f57f-4c3f-9723-9212d28855c9 | TuilaTammmmm/Code | CodePTIT/CPP0512.cpp |
#include <bits/stdc++.h>
using namespace std;
struct PhanSo {
long long tu, mau;
};
void rutGon(PhanSo &A) {
long long g = __gcd(A.tu, A.mau);
A.tu /= g;
A.mau /= g;
}
PhanSo sum(PhanSo A, PhanSo B) {
PhanSo C;
long long g = __gcd(A.mau, B.mau);
long long l = A.mau * B.mau / g;
C.tu ... | ALGO | 0.999636 | 5.322346 |
e932cc3e-9644-439d-bfbd-29ac7e4628bf | ishandutta2007/codeforces | golikovnik/normal/1648/D.cpp | #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
#ifdef GOLIKOV
#define debug(x) cerr << (#x) << ":\t" << (x) << endl
#else
#define debug(x) 238;
#endif
template <class A, class B>
bool smin(A &x, B &&y) {
if (y < x) {
x = y... | ALGO | 0.999855 | 3.932673 |
d9ef23ce-0c85-433e-8deb-4adea514b443 | CamJam91/c-Class | headStart/challenges/ch8/challenge8/main.cpp | #include<iostream>
using namespace std;
int linearSearch(int[], int);
//int binarySearch(int[], int);
const int SIZE = 5;
int main(){
int searchMe[SIZE] = {1,3,5,9,120};//45,90,91,92,93,101,
//455,456,457,1000,1003,3205,3207,3500,4900}; //array to be serched
int linearComparisons, //holds the number of sea... | ALGO | 0.999563 | 4.036834 |
10abe821-6338-41b7-9acc-d71fb45328f8 | Moube/LearnOpenGL | Libraries/assimp/code/AssetLib/IFC/IFCBoolean.cpp | /** @file IFCBoolean.cpp
* @brief Implements a subset of Ifc boolean operations
*/
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
#include "AssetLib/IFC/IFCUtil.h"
#include "Common/PolyTools.h"
#include "PostProcessing/ProcessHelper.h"
#include <iterator>
#include <tuple>
namespace Assimp {
namespace IFC {
// ----------... | ALGO | 0.995975 | 7.266501 |
a839e1c7-25c5-4733-bbbe-0b90d766ea0e | Tenlua/haha | vtdl vagiaithuat/kfsac.cpp | #include <iostream>
#include <vector>
using namespace std;
// Hàm giải bài toán Knapsack
int knapsack(int W, vector<int>& wt, vector<int>& val, int n) {
vector<vector<int>> dp(n + 1, vector<int>(W + 1));
// Khởi tạo bảng dp
for (int i = 0; i <= n; i++) {
for (int w = 0; w <= W; w++) {
... | ALGO | 0.999958 | 5.247099 |
81d59477-1dd6-4d39-9d03-58777be24947 | PhoenixDigitalFX/ARCSim-HYLC | dependencies/eigen/lapack/lu.cpp | #include "common.h"
#include <Eigen/LU>
// computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges
EIGEN_LAPACK_FUNC(getrf,(int *m, int *n, RealScalar *pa, int *lda, int *ipiv, int *info))
{
*info = 0;
if(*m<0) *info = -1;
else if(*n<0) ... | ALGO | 0.9993 | 5.816968 |
e1d93447-a057-44c7-8a1f-b643cce11542 | nicoelayda/competitive-programming | Project Euler/PE018_MaximumPathSumI.cpp | #include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main() {
const int n = 15;
int map[n][n], cost[n][n];;
memset(map, 0, sizeof(map[0][0]) * n * n);
memset(cost, 0, sizeof(cost[0][0]) * n * n);
for (int r = 0; r < n; r++) {
for (int c = 0; c <= r; c++) ... | ALGO | 0.999849 | 4.198595 |
8e7d1aea-37e0-4150-8a82-b06e313b8929 | hululuhu/Stereo_camera_inertial_navigation_robot | src/surfel_fusion/src/fusion_functions.cpp | #include "fusion_functions.h"
#include <thread>
#include <cmath>
#include <chrono>
#include <omp.h>
void FusionFunctions::initialize(
int _width, int _height,
float _fx, float _fy, float _cx, float _cy,
float _fuse_far, float _fuse_near)
{
image_width = _width;
image_height = _height;
sp_width ... | ALGO | 0.997435 | 4.397228 |
65f5ed44-9522-44f7-8188-46b96ba2cdea | Sangithub5632/C- | starprint4.cpp |
#include<iostream>
using namespace std;
int main()
{
int i , j , k,n;
cin>>n;
for ( i=0 ;i < n; i++)
{
for (j=0; j<i; j++)
{
cout<<" ";
}
for (k=i;k=n-i;k++)
{
cout<<"*";
}
cout<<"\n";
}
} | ALGO | 0.999944 | 3.624481 |
52f1262c-a885-4ef2-a568-646596c1bb30 | s-a-n-dhya/Algorithms | 4bfswh.cpp | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> adj;
unordered_map<int, string> nodeName;
void printPath(const vector<int>& path) {
for (size_t i = 0; i < path.size(); i++) {
cout << nodeName[path[i]];
if (i + 1 != path.size()) cout << "->";
}
cout << endl;
}
void BFSWit... | ALGO | 0.999944 | 5.420888 |
d9dc9fa5-53a9-4d80-a451-71fd81a093d9 | VenomRom/android_system_core | fastboot/fastboot.cpp | #include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <chrono>
#include <functi... | TOOL | 0.984994 | 6.727238 |
53ed7e80-0698-4a19-a49c-5f3578613184 | ishandutta2007/codeforces | jdurie/normal/1437/C.cpp | #pragma GCC target ("avx2")
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
template<class T, class S>
ostream& operator << (ostream &o, const pair<T, S> &p) {
return o << '(' << p.first << ", " << p.second << ')';
}
template<template<class, class...> ... | ALGO | 0.999853 | 4.768452 |
b3bd33b6-8e1d-4f63-b479-53099e78b153 | T-nafisa/T-nafisa-CPP_Backtracking_Pointer-OOP-based-Projects | Tower_of_Hanoi/tower_of_Hanoi_usingVector.cpp | #include <iostream>
#include <vector>
using namespace std;
int main() {
// Create 3 towers using an array of vectors. Each tower will store rings.
vector<int> t[3]; // t[0] for Tower A, t[1] for Tower B, t[2] for Tower C
int n;
cout << "Please enter the total number of rings you want to move: ";
cin >> n;
cou... | ALGO | 0.999971 | 6.144062 |
6504dd50-5626-4721-8317-e0e7a60381ac | ishandutta2007/codeforces | couplefire/normal/1163/F.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1<<18;
const int INF = 1e17+5;
int n, m, q;
array<int, 3> edges[N];
vector<array<int, 2>> adj[N];
int par[3][N], id[3][N], dist[3][N], ans[N], path[N];
int tree[2*N];
vector<array<int, 3>> qs[N];
vector<array<int, 3>> es[N];
void upd(i... | ALGO | 0.999977 | 4.653481 |
128a5d10-d4bd-4fed-a58b-02d1cbb31a7c | Hoangnhan1708/ANN-Final-Project | Source/ann/third_party/eigen/unsupported/doc/examples/MatrixExponential.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
int main()
{
const double pi = std::acos(-1.0);
MatrixXd A(3,3);
A << 0, -pi/4, 0,
pi/4, 0, 0,
0, 0, 0;
std::cout << "The matrix A is:\n" << A << "\n\n";
std::cout << "The matrix exponential ... | ALGO | 0.999771 | 3.706936 |
26131d5e-8d88-43ec-9418-db4ce7ed2938 | geekygirl8/Hacktoberfest_2022_DSA | C++/Leetcode/linked_list_cycle.cpp |
// problem link: https://leetcode.com/problems/linked-list-cycle/
// github link : https://github.com/speedcoder121
class Solution {
public:
bool hasCycle(ListNode *head) {
ListNode* s=head;
ListNode* f=head;
while(f!=NULL && f->next!=NULL){
s=s->next;
f=f-... | ALGO | 0.999844 | 5.029711 |
f6856acc-fb8f-49bb-88a9-aa1b67e01aa5 | iuyoy/basicCSKnowledge | leetcode/92. Reverse Linked List II/RLL2.cpp | /*
Reverse a linked list from position m to n. Do it in one-pass.
Note: 1 ≤ m ≤ n ≤ length of list.
Example:
Input: 1->2->3->4->5->NULL, m = 2, n = 4
Output: 1->4->3->2->5->NULL
*/
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), n... | ALGO | 0.99995 | 5.960007 |
bbd1b374-0850-4b20-a790-6db644e7539b | javaliu2/candcpp | algorithm/leetcode/array/3065.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int minOperations(vector<int>& nums, int k) {
int ans = 0;
for (int ele : nums) {
if (ele < k) {
ans++;
}
}
return ans;
}
}; | ALGO | 0.999948 | 5.283787 |
0d95d6b8-dc2a-48fd-bb7e-eb22547c1a90 | Slamur/competitive-programming | Codeforces/Rounds/386 (746)/G.cpp | #pragma comment(linker, "/STACK:66777216")
#define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <math.h>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <set>
#include <bitset>
#include <ctime>
#include <queue>
#include <deque>
#include <iomanip>
#inc... | ALGO | 0.999592 | 3.637514 |
0344f4a0-1e35-4994-947b-ea5e89d5d7db | antusaha970/My-source-code-DSA | leetcode/rootequaltosum.cpp | #include <iostream>
#include<vector>
using namespace std;
// 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 *... | ALGO | 0.999931 | 6.529696 |
6d1d9484-caa5-466f-a37f-20a8d11989f5 | rahul-797/error_detection_and_correction | hamming-code/codeCorrection.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
bool* checkParityBits(vector<vector<int>>& vec, bool* errParityBits) {
int value = 0;
for (int i = 0; i < 4; i++) {
for (int j = 1; j < 4; j += 2) {
value += vec[i][j];
}
}
if ((value % 2) != 0) {
errParityBits[0] = ... | ALGO | 0.999784 | 5.203975 |
346fef5e-dc3b-4d9f-a24b-2ee77abc05d9 | F-WTB/abc349 | c.cpp | #include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using bint = boost::multiprecision::cpp_int;
using mint = modint998244353;
using pr = pair<int, int>;
ostream &operator<<(ostream &os, const mint &x)
{
os <... | ALGO | 0.999979 | 4.819408 |
d31343a2-7cea-413a-a836-296f97c5be22 | MouryaVishal/6Companies30days | 4_FlipKart/Check_String_Contains_Binary_Codes_Size_K.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
vector<string> val={"0","1"};
bool func(string curr,int k,unordered_map<string,bool> &mp){
if(k==0){
if(mp.find(curr)==mp.end())
return false;
return true;
}
for(int i=0;i<2;i++){
... | ALGO | 0.999934 | 4.720304 |
b3b1ea88-6213-48f4-8202-02d35b9fab55 | ztg-666/algorithm | algorithm/Graph/Graph Traversal/BFS/01BFS/MinimumObstacleRemovalToReachCorner.cpp | #include <iostream>
#include <vector>
#include <deque>
#include <climits>
using namespace std;
class Solution {
public:
/**
* 计算从左上角到右下角需要移除的障碍物的最小数目
* @param grid 二维整数数组,0 表示空单元格,1 表示障碍物
* @return 需要移除的障碍物的最小数目
*/
int minimumObstacles(vector<vector<int>>& grid) {
// 定义移动方向数组:上、右、下... | ALGO | 0.999966 | 6.307354 |
64b2ad9d-c7cf-46df-bc3e-c8f4fec2a41b | mymyuy/N22DCDK052_C_PLUS_PLUS | chapter_2/challenge/challenge_13.cpp | #include <iostream>
using namespace std;
int main()
{
double price = 14.95, tax = 0.35;
// tinh va in ra ket qua
cout << "Gia sau thue: " << price + price*tax;
return 0;
} | TOOL | 0.930352 | 3.685919 |
23f45ce8-8bb7-40e7-bec5-a63670977c83 | bishalprasad321/DSA-Code | LinkedLists/01_singly_linkedList_operations.cpp | #include<bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node* next;
// Function for traversing the Linked List.
void traverse(Node* node);
// Functions for inserting elements at different positions in the Linked List.
void push (Node** head, int... | ALGO | 0.997855 | 4.563632 |
55b4689e-6de1-4575-9aff-4b3fa55c30e4 | yhwhu/Cpp-Primer-Plus | Chapter5/ex3.cpp | //
// Created by 粟永华 on 2019/11/9.
//
#include <iostream>
int main(){
using namespace std;
int num, sum = 0;
cin >> num;
while(num!=0){
sum += num;
cout << "Now the cusum is: " << sum << endl;
cin >> num;
}
} | ALGO | 0.990114 | 3.356793 |
52a1d916-401d-45a3-a23a-ba96f4f9fc9c | JesseOgunlaja/CPlusPlus | Factorials.cpp | #include <iostream>
int main()
{
int number;
std::cout << "Enter a number ";
std::cin >> number;
int x = 1;
int factorial = 1;
do {
x += 1;
factorial *= x;
}
while (x != number);
std::cout << "The factorial of " << number << " is " << factorial ;
return 0;
}
| ALGO | 0.999459 | 4.471662 |
03b46c8e-4d8d-44a4-a2cc-aa5659277d1d | Anzaalae/College_Task | Object_Oriented_Programming/8-1.cpp | #include <iostream>
using namespace std;
class Circle {
int radius;
public:
Circle() { radius= 1; }
Circle(int radius) { this->radius= radius; }
double getArea() const { return 3.14*radius*radius; }
int getRadius() {return radius;}
void setRadius(int radius) {this->radius= radius;}
};
void sw... | ALGO | 0.985324 | 5.498031 |
8e9298de-7c5c-4703-aa0c-02b14515ae06 | PPL-IIITA/ppl-assignment-MrGooglehead | phase_2/GenerateGifts.cpp | #include "GenerateGifts.h"
#include <bits/stdc++.h>
using namespace std;
void GenerateGifts::generate()/**member function for randomly generating gifts and later sorting them*/
{
ofstream fp;
fp.open("giftlist.txt");
int n;
n=rand()%10+95;
fp<<n<<"\n";
int i=0;
int id[200];
int t[200];
i... | TOOL | 0.933058 | 3.113399 |
9c1b0fbe-47a2-4264-a140-aef4d42a111a | DionysiosB/CodeForces | 0800-0899/841A-GenerousKefa.cpp | #include <iostream>
#include <vector>
int main(){
const int N = 26;
long n, k; std::cin >> n >> k;
std::string s; std::cin >> s;
bool possible(true);
std::vector<long> v(N);
for(long p = 0; p < s.size(); p++){++v[s[p] - 'a'];}
for(long p = 0; p < N; p++){if(v[p] > k){possible = false; brea... | ALGO | 0.999991 | 4.710413 |
ee30b9fc-e556-4e6c-8342-57ca963e98e9 | marwan-abdellah/luxrender-lux | renderers/sppm/kdtree.cpp | #include "hitpoints.h"
#include "lookupaccel.h"
#include "bxdf.h"
using namespace lux;
KdTree::KdTree(HitPoints *hps): HitPointsLookUpAccel(hps) {
maxNNodes = hitPoints->GetSize();
nextFreeNode = 1;
nodes = NULL;
nodeData = NULL;
nodes = new KdNode[maxNNodes];
nodeData = new HitPoint*[maxNNodes];
}
KdTree::... | ALGO | 0.996084 | 5.990828 |
7cd93373-debd-446b-862d-e481e6debb4e | perchuts/CompetitiveProgramming | summer22/World Finals #4/h.cpp | #include <bits/stdc++.h>
#define maxn (int)(1e5+51)
#define all(x) x.begin(), x.end()
#define sz(x) (int) x.size()
#define endl '\n'
#define ll long long
#define pb push_back
#define ull unsigned long long
#define ii pair<int,int>
#define iii tuple<int,int,int>
#define inf 2000000001
#define mod 1000000007 //998244353
... | ALGO | 0.999842 | 5.278121 |
bb826c96-b746-4e09-8458-8fc1bbb29eaa | shrutarshi2002/CPP-DSA | DSA-cpp-main/02. Mathematics/digits in factorial.cpp | // { Driver Code Starts
//Initial Template for C++
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution{
public:
int digitsInFactorial(int N)
{
double digit=0;
for(int i=1;i<=N;i++)
digit+=log10(i);
return ... | ALGO | 0.99916 | 6.073677 |
91a43bc4-47bc-48c0-8ea7-3ede67d1a982 | zee-bit/FINAL450 | Dynamic Programming/Maximum SS no 3 consecutive elements.cpp | #include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
typedef long long ll;
typedef long double ld;
struct custom_hash;
#define ff first
#define I insert
#define ss second
#define maxN 300002
#define inf INT_MAX
#define ninf INT_MIN
#define pb push_back
#define popb pop_back
#define pf push_front
#... | ALGO | 0.999963 | 4.320595 |
5cba6850-9de4-4283-a6a6-f3c2e38cf0ef | ishandutta2007/codeforces | far_from_noob/normal/1586/E.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll int
#define dd double
#define endl "\n"
#define pb push_back
#define all(v) v.begin(),v.end()
#define mp make_pair
#define fi first
#define se second
#define vll vector<ll>
#define pll pair<ll,ll>
#define fo(i,n) for(int i=0;i<n;i++)
#define fo1(i,n) for(int i=1;i... | ALGO | 0.999953 | 4.319877 |
bd26641b-853f-4c38-9c63-01f92bfaece0 | M45UDrana/DS-Algo-Problem-Solving | codeforces/1046F.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int n; cin >> n;
ll a[n];
for(int i = 0; i < n; i++)
cin >> a[i];
ll x, f; cin >> x >> f;
ll ans = 0;
for(int i = 0; i < n; i++)
{
ans += a[i]/(x+f);
a[i] %= (x+f);
ans += (a[i... | ALGO | 0.999669 | 3.867849 |
8dea4db9-043e-42e7-9df3-26e24b31051b | anoobzg/qi | src/tbb/src/src/test/test_parallel_sort.cpp | #include "tbb/parallel_sort.h"
#include "tbb/task_scheduler_init.h"
#include "tbb/concurrent_vector.h"
#include "harness.h"
#include <math.h>
#include <vector>
#include <exception>
#include <algorithm>
#include <iterator>
#include <functional>
#include <string>
#include <cstring>
/** Has tightly controlled interface s... | TEST | 0.969695 | 7.38309 |
049bd955-792b-476e-a75b-daebde97afd5 | harrifeng/version-src | rustc-1.3.0/src/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp | #include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Pass.h"
#include "llvm/Supp... | ALGO | 0.995478 | 3.039769 |
9cd2c6d5-ca12-437f-b6c9-3e8482fa434f | DevleenaBanerjee/Stock_Prediction_ds | venv/Lib/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/libs/graph/example/incremental_components.cpp | #include <boost/foreach.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_utility.hpp>
#include <boost/graph/incremental_components.hpp>
#include <boost/pending/disjoint_sets.hpp>
/*
This example shows how to use the disjoint set data structure
to compute the connected components of an un... | ALGO | 0.999682 | 7.026225 |
629f944b-86b9-4f99-91bf-2a5403530005 | XpqX-1311/acm | code/图论/最小生成树/次小生成树.cpp | /*
* 次小生成树
* 求最小生成树时,用数组 Max[i][j] 来表示 MST 中 i 到 j 最大边权
* 求完后,直接枚举所有不在 MST 中的边,替换掉最大边权的边,更新答案
* 点的编号从 0 开始
*/
const int MAXN = 110;
const int INF = 0x3f3f3f3f;
bool vis[MAXN];
int lowc[MAXN];
int pre[MAXN];
int Max[MAXN][MAXN];//Max[i][j] 表示在最小生成树中从 i 到 j 的路径中的最
权
bool used[MAXN][MAXN];
int Prim(int cost[][MAXN], int ... | ALGO | 0.999942 | 4.032795 |
fe6954fd-6f6a-46f9-92b5-b2f5e9055472 | HONGYANGGAN/leetcode | solution/1800-1899/1807.Evaluate the Bracket Pairs of a String/Solution.cpp | class Solution {
public:
string evaluate(string s, vector<vector<string>>& knowledge) {
unordered_map<string, string> d;
for (auto& e : knowledge) {
d[e[0]] = e[1];
}
string ans;
for (int i = 0; i < s.size(); ++i) {
if (s[i] == '(') {
i... | ALGO | 0.99999 | 5.324845 |
d4d41202-5ba2-4f01-bbca-6b66f19c7e99 | osama722004/data-structures-and-algorithms | problems/3n+1sequence.cpp | #include <iostream>
using namespace std;
int c;
int suq(int n){
if (n==1)
{
c++;
return c;
}
if (n%2==0)
{
c++;
return suq(int(n/2));
}else
{
c++;
return suq(3*n+1);
}
}
int main(){
int n;
cin>>n;
cout<<suq(n);
} | ALGO | 0.999857 | 4.344027 |
6b32d499-3ca2-45aa-bd47-141427824bdd | yulongran/Codeforces | CF1840/C.cpp | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
void solve(){
int n, k, q; cin >> n >> k >> q;
vector<int> A(n, 0);
long long res = 0, len = 0;
for(int i=0; i<n; i++) cin >> A[i];
for(int i=0; i<n; i++){
if(A[i] <= q){
len += 1;
}else{
if(len >= k){
res += (len - k + 1) * (len... | ALGO | 0.999241 | 4.181139 |
7796f238-d84c-420b-aa7e-db2a43a3428b | raman7073/AllAboutCPP | Contest/Codeforces/Codeforces Round 900/C.cpp | #include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
long long n, k, x;
cin >> n >> k >> x;
if (k * (k + 1) / 2 <= x && x <= k * (2 * n - k + 1) / 2) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
... | ALGO | 0.999525 | 4.357735 |
a1757d73-a1e3-40bd-a35c-9c997886bda1 | youmemonk/Leetcode | 0028-find-the-index-of-the-first-occurrence-in-a-string/0028-find-the-index-of-the-first-occurrence-in-a-string.cpp | class Solution {
private:
bool compare(string haystack, string needle, int i){
for(int j = 0; j < needle.length(); j++){
if(haystack[i] != needle[j])
return false;
i++;
}
return true;
}
public:
int strStr(string haystack, string needle) {
... | ALGO | 0.999968 | 5.715315 |
249ae670-ea57-4b95-8655-bbeb95fd6bb2 | amans5000/CSES_Solutions | Trees/maxDiameter.cpp | #include <bits/stdc++.h>
using namespace std;
int dfs(unordered_map<int, vector<int>> &m, int index)
{
return 0;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
unordered_map<int, vector<int>> adj;
for (int i = 0; i < n - 1; i++)
{
int a, b;
cin >> a >... | ALGO | 0.999275 | 4.412021 |
a074266c-67c9-462e-b242-92fb17195051 | maartenb/cern-root | interpreter/llvm/src/lib/CodeGen/GlobalISel/Combiner.cpp | #include "llvm/CodeGen/GlobalISel/Combiner.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/CodeGen/GlobalISel/CSEInfo.h"
#include "llvm/CodeGen/GlobalISel/CombinerInfo.h"
#include "llvm/CodeGen/GlobalISel/CSEMIRBuilder.h"
#include "llvm/CodeGen/GlobalISel/GISelChangeObserver.h"
#include "llvm/CodeGen/GlobalIS... | ALGO | 0.892207 | 7.940012 |
bc918cc7-321c-4562-8df4-e13cb12a8080 | Arpitpandey992/cpp-vscode | Contests and Practice/CodeForces/OLD/Gargari and Bishops.cpp | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define M 1000000007
#define nl cout << '\n'
#define us unsigned short
#define ull unsi... | ALGO | 0.999952 | 3.264937 |
8dd4daf4-fa73-4b7c-85d0-b05ee6cfac1a | WONILLISM/Algorithm | 01_baekjoon/01_BOJ_Step/Step22(dynamic procramming 1.5)/01_22_01 coin1(2293).cpp | #include<cstdio>
using namespace std;
int N, K;
int coin[101], dp[10001];
int solution() {
dp[0] = 1;
for (int i = 0; i < N; i++) {
for (int j = coin[i]; j <= K; j++) {
dp[j] += dp[j - coin[i]];
}
}
return dp[K];
}
int main() {
scanf("%d %d", &N, &K);
for (int i = 0; i < N; i++)
scanf("%d", &coin[i]);
... | ALGO | 0.999863 | 3.949216 |
efd84754-1dd4-4b86-b924-f02d3421ff73 | sabbirahmedfahim/ProblemSolving | Codeforces/D_I_Love_1543.cpp | #include <bits/stdc++.h>
#define nl '\n'
#define ll long long int
#define print(v) for(auto data : v) cout << data << " "; cout << nl
#define FAJR_BOOST() ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;
void solve()
{
int n, m; cin >> n >> m;
char mat[n][m];
for (int i = 0; i < n; i++)... | ALGO | 0.999668 | 4.385243 |
58ea968d-aa1a-44c3-80f7-c912c134173b | adarshsingh1706/Cpp-files | DP/jump.cpp | //memoization
// class Solution {
// public:
// int helperfn(vector<int> &arr, int k, int index, vector<int> &dp) {
// // Base case
// if (index == 0) return 0;
//
// if (dp[index] != -1) return dp[index];
// int minimum = INT_MAX;
// for (int i = 1; i <= k; i++) ... | ALGO | 0.999979 | 5.82613 |
e59a3075-3429-442d-9d94-6fe5632fdbca | ayushrawat220804/programming | cpp_dsa/data_structures/array/123.cpp | #include <iostream>
using namespace std;
int main() {
int number;
int sum = 0;
cout << "Enter a number: ";
cin >> number;
while (number >= 0) {
// Add positive numbers to the sum
sum += number;
// Take input again if the number is positive
cout << "Enter a number:... | ALGO | 0.998347 | 3.917505 |
83f98531-292c-44ef-b0ea-d69597697d90 | marvalarva2929/Competitive_Programming | USACO/silver/2023/Open (March)/milk_sum.cpp | using namespace std;
#include <bits/stdc++.h>
#define int long long
#define nl '\n'
const int mxn = 1.5e5 + 1;
int a[mxn];
multiset<int> aa;
int b[mxn]; // sorted a
int t[mxn]; // sorted indeces of a
int _t[mxn];
int pref[mxn]; // prefix sums
int n, q;
signed main() {
cin.tie(0)->sync_with_stdio(false);
cin >... | ALGO | 0.999932 | 4.469059 |
31321b12-7422-464d-b887-d5de46382d43 | mrsantoshsahoo/game_template | 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 |
1bddb562-0a62-44ed-ad8a-644947111e05 | nishgpt/competitive_programming | spoj/ACS.cpp | /* NISHANT GUPTA CSE-MNNIT ALLAHABAD*/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <algorithm>
#include <vector>
#include <cstring>
#include <stack>
#include <cctype>
#include <utility>
#include <map>
#include <string>
#include <climits>
#include <set>
#include <s... | ALGO | 0.996362 | 3.009147 |
ba75a9f3-fde9-4990-bf35-63991679b128 | pipigenius/ocv_contrib | modules/videostab/src/inpainting.cpp | #include "precomp.hpp"
#include <queue>
#include "opencv2/videostab/inpainting.hpp"
#include "opencv2/videostab/global_motion.hpp"
#include "opencv2/videostab/fast_marching.hpp"
#include "opencv2/videostab/ring_buffer.hpp"
#include "opencv2/opencv_modules.hpp"
namespace cv
{
namespace videostab
{
void InpaintingPipel... | TOOL | 0.966172 | 6.210614 |
cc13b49e-61bd-4b16-859f-8c54bf7153e6 | pavel-pimenov/flylinkdc-r6xx | libtorrent/src/torrent_peer.cpp | #include "libtorrent/aux_/torrent_peer.hpp"
#include "libtorrent/assert.hpp"
#include "libtorrent/aux_/string_util.hpp"
#include "libtorrent/aux_/peer_connection.hpp"
#include "libtorrent/aux_/crc32c.hpp"
#include "libtorrent/aux_/ip_voter.hpp"
#include "libtorrent/aux_/io_bytes.hpp" // for write_uint16
#include "libto... | ALGO | 0.952947 | 6.473545 |
5c1bc03e-4724-49e4-a3bf-4502e38bfa0f | TalGeuli/3D_Animation_Assignment_3 | igl/shapeup.cpp | #include <igl/shapeup.h>
#include <igl/min_quad_with_fixed.h>
#include <igl/igl_inline.h>
#include <igl/setdiff.h>
#include <igl/cat.h>
#include <igl/PI.h>
#include <Eigen/Core>
#include <vector>
namespace igl
{
//This projection does nothing but render points into projP. Mostly used for "echoing" the global st... | ALGO | 0.999653 | 5.308087 |
332d1433-3fb9-47a8-9874-2f8fd9479455 | pynac/pynac | ginac/inifcns_gamma.cpp | /** @file inifcns_gamma.cpp
*
* Implementation of Gamma-function, Beta-function, Polygamma-functions, and
* some related stuff. */
#include "inifcns.h"
#include "constant.h"
#include "infinity.h"
#include "pseries.h"
#include "numeric.h"
#include "power.h"
#include "relational.h"
#include "operators.h"
#include "... | ALGO | 0.951984 | 7.562772 |
3fc71b49-6d72-4d68-8c62-2911e1d9ba4f | MYCIN-AI-Club/External-Projects | NGE.cpp | #include <iostream>
using namespace std;
void printNGE(int arr[], int n)
{
int next, i, j;
for (i = 0; i < n; i++) {
next = -1;
for (j = i + 1; j < n; j++) {
if (arr[i] < arr[j]) {
next = arr[j];
break;
}
}
cout << arr[i] <... | ALGO | 0.999975 | 4.53038 |
cc27ce83-37cd-4744-8340-0a701e2482bf | Anjalijha12345/DSA--Problem | Question 9/Middle of linked list.cpp | #include <iostream>
class ListNode {
public:
int val;
ListNode* next;
ListNode(int val) : val(val), next(NULL) {}
};
class Solution {
public:
ListNode* middleNode(ListNode* head) {
ListNode* slow = head;
ListNode* fast = head;
while (fast != NULL && fast->next != NULL) {
... | ALGO | 0.999992 | 6.502333 |
d954f639-0163-42fe-a156-d401a9f85b35 | runvs/QuasarRush | ext/box2d/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp | #include "Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h"
#include "Box2D/Common/b2BlockAllocator.h"
#include "Box2D/Dynamics/b2Fixture.h"
#include <new>
b2Contact* b2EdgeAndPolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)
{
void* mem = allocator->Allocat... | ALGO | 0.975105 | 6.877173 |
0a3e7c6b-02fa-4d1c-aad5-d1de14ba1473 | Hexeong/Coding | Baekjoon_C++/17140_Samsung.cpp | // https://www.acmicpc.net/problem/17140
#include <iostream>
#include <string.h>
#include <vector>
using namespace std;
int r, c, k;
int A[100][100];
int num_cnt[101];
int row_max_length = 3;
int col_max_length = 3;
// 5천만 가능
// 100초 * operation(100 * 100)
void operation_R() {
int cur_row_max = 0;
for (int i... | ALGO | 0.999931 | 3.940281 |
c052c0c3-1c58-49f7-8e47-fd1535df3199 | MrLakshay/DSA-Practice | Striver Sheet/Array/Threesum.cpp | class Solution {
public:
vector<vector<int>> threeSum(vector<int>& nums) {
vector<vector<int>> ans;
int n=nums.size();
sort(nums.begin(),nums.end());
for(int i=0;i<n;i++){
if(i>0 and nums[i]==nums[i-1]) continue;
int j=i+1,k=n-1;
while(j<k){
... | ALGO | 0.999912 | 6.117747 |
d4911433-6317-41a7-8332-0571d1ca5bc8 | thehashmap/leetcode | Maximum Height Tree - GFG/maximum-height-tree.cpp | // { Driver Code Starts
//Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution{
public:
int height(int N){
// code here
return (-1 + sqrt(1 + 8*N)) / 2;
}
};
// { Driver Code Starts.
int main(){
int... | ALGO | 0.999886 | 5.693631 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.