uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
c2ae1a19-961a-4e20-9a7e-e21dea3bb6cd | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_4338_16.cpp | #include <bits/stdc++.h>
using namespace std;
const long long inf = 8000000000000000000;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long long y, x, lest, lift, speed;
cin >> y >> x >> lest >> lift >> speed;
vector<long long> lst(lest), lft(lift);
for (long long c = 0; c < lest... | ALGO | 0.999961 | 4.561171 |
4cebfc67-daeb-4e93-b533-1e472df6fb38 | rutikakorhale/CPP | hw7.cpp | // updater.
#include<iostream>
using namespace std;
class Number
{
private:
int iNo;
public:
Number(int X)
{
iNo = X;
}
void Display()
{
int iCnt = 0;
if(iNo < 0)
{
iNo = -iNo;
}
for(iCnt = 1; iCnt <= iNo; iCnt++)
... | TOOL | 0.999443 | 3.485977 |
4bbd5b54-2808-4556-827e-5b9bcdab3fbd | ishandutta2007/codeforces | mnbvmar/normal/1586/D.cpp | //~ while (clock()<=69*CLOCKS_PER_SEC)
//~ #pragma comment(linker, "/stack:200000000")
#ifndef LOCAL
#pragma GCC optimize("O3")
#endif
//~ #pragma GCC optimize("Ofast")
//~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//~ #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#in... | ALGO | 0.999988 | 3.435226 |
2d3af9db-b37b-4b1a-899e-25d82aeed2cb | Abhishek58003/DSA-Question | 01 Arrays/Array Class - 1/linearSearch.cpp | #include<iostream>
#include<limits.h>
using namespace std;
bool TargetElement(int arr[],int size){
int targetelement=89;
for(int i=0;i<size;i++){
if(arr[i]==targetelement){
return true;
}
}
return false;
}
int main(){
int arr[]={12,13,15,16,19,18,79};
int siz... | ALGO | 0.996701 | 3.429447 |
364686c5-a04d-42e2-ad29-3e21fce7c998 | rbacon4/coh-original-server-vs2010 | 3rdparty/cryptopp/algebra.cpp | // algebra.cpp - written and placed in the public domain by Wei Dai
#include "pch.h"
#include "algebra.h"
#include "integer.h"
#include <vector>
NAMESPACE_BEGIN(CryptoPP)
template <class T> const T& AbstractGroup<T>::Double(const Element &a) const
{
return Add(a, a);
}
template <class T> const T& AbstractGroup<T>... | ALGO | 0.999344 | 6.767612 |
e6267232-904e-4f1f-bfca-ffcd3392b797 | RolandoAndrade/principios-de-programacion | Capitulo 1/cuadradoPerfecto.cpp | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main(int argc, char const *argv[])
{
freopen("inputFiles/cuadrado perfecto.txt","r",stdin);
int i;
while(scanf("%d",&i)!=EOF)
{
if((int)sqrt(i)*(int)sqrt(i)==i)
cout<<i<<" es cuadrado perfecto... | ALGO | 0.99906 | 3.890771 |
93898b64-1087-4148-9d41-9c3312711fd6 | pierrebrd/Projet_OS202 | src/model.cpp | #include <stdexcept>
#include <cmath>
#include <iostream>
#include "model.hpp"
namespace
{
double pseudo_random(std::size_t index, std::size_t time_step) { // On donne un index et un pas de temps et on renvoie un nombre pseudo-aléatoire
std::uint_fast32_t xi = std::uint_fast32_t(index * (time_step + 1));
... | ALGO | 0.997641 | 4.306213 |
699504fe-24c8-423b-a176-4fca9fb5a77e | Ryoukiwei/Leetcode | 48 Rotate Image.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
void rotate(vector<vector<int>> &matrix)
{
size_t n = matrix.size();
for (int i = 0; i < n; i++)
{
for (int j = i + 1; j < n; j++)
swap(matrix[i][j], matrix[j][i]);
reverse(m... | ALGO | 0.999956 | 5.606655 |
d76738c3-4c0d-4fcd-849d-e4edf3913083 | thaylongs/fastbit | src/parth.cpp | #include <math.h> // ceil, sqrt
#include <limits> // std::numeric_limits
#include <typeinfo> // typeid
#include <memory> // unique_ptr
#include <iomanip> // setw, setprecision
// This file definte does not use the min and max macro. Their presence
// could cause the calls to numeric_limits:... | DATA | 0.917515 | 7.367238 |
fca00a5a-1f9d-49ec-b5d7-ac1350305bdd | GomTangOng/Study-Algorithm | Algorithm/Baekjoon/1012.cpp | #include <iostream>
using namespace std;
#define MAX_LENGTH 50
int farm[MAX_LENGTH][MAX_LENGTH]{ 0, };
int bechu_cnt{ 0 }, width{ 0 }, height{ 0 };
void Check(int x, int y)
{
if (y < 0 || x < 0 || y >= height || x >= width)
return;
if (farm[y][x] == 0)
return;
farm[y][x] = 0;
Check(x - 1, y);
Check(x + ... | ALGO | 0.999941 | 4.041779 |
f22d4760-9f49-4a1b-8ece-8b6a412a188b | Ash-codes18/Cpp_DSA | Programs/Leetcode/2130-maximum-twin-sum-of-a-linked-list/2130-maximum-twin-sum-of-a-linked-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
// Approach-1 : Brute Force -> Using vector to st... | ALGO | 0.999992 | 5.843267 |
6c8bf8f7-9e64-46fa-add4-0a43f0f2e2b3 | Starfurye/Algorithm_Problems | Codes/CCF_CSP/201409-2_画图.cpp | #include<cstdio>
#include<algorithm>
using namespace std;
const int maxn = 105;
int n;
int board[maxn][maxn];
void draw(int x1, int y1, int x2, int y2) {
for (int i = x1; i < x2; ++i) {
for (int j = y1; j < y2; ++j) {
board[i][j] = 1;
}
}
}
int main()
{
fill(board[0], board[0] + maxn * maxn, 0);
scanf("%d", ... | ALGO | 0.995081 | 3.666743 |
3c11ce83-b876-4e3f-bf78-809b92a99396 | ImtiazAhmedAkash/Problem-Solving | atcoder/abc331/B.cpp | /* In the Name of ALLAH, the most gracious, the most merciful */
// Buy One Carton of Milk
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define nl '\n'
#define deb(x) cerr << #x << " = " << x << nl
const int inf = 1e9;
const ll INF = 1e18;
const int mod = 998244353;
const int N = 2e5 + 5;
v... | ALGO | 0.999692 | 4.770768 |
6cc705df-9f50-40c6-b635-9dd5beab0e0f | abril200009/Abril | 500.cpp | #include <stdio.h>
int main() {
int x = 1;
while (x <= 500) {
printf("%d,%d,%d ", x, x*x, x*x*x);
x++;
}
return 0;
} | ALGO | 0.999442 | 3.03986 |
8761d01f-c1e7-438e-ae70-f23bbda7aaad | Mitesh-Codes/DSA-with-CPP | 018TwoD_Array.cpp | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
bool isPresent(int arr[][4],int key,int row, int col){
for(int i=0;i<row;i++){
for (int j=0;j<col;j++){
if(arr[i][j]==key){
return true;
}
}
}
return false;... | ALGO | 0.999849 | 4.298007 |
8ecf7051-9567-4301-b0f1-082a20f7fbce | Ilhamkawe/C- | 40program/9.cpp | #include <iostream>
using namespace std;
int main (){
int r,t,v;
float const phi=3.14,y= 0.3;
cout<<"Volume Kerucut"<<endl;
cout<<"masukan jari-jari :";
cin>>r;
cout<<"masukan tinggi:";
cin>>t;
v=phi*r*t*y;
cout<<"volume kerucut :"<<v<<endl;
//system ("pause");
return 0;
}
| ALGO | 0.956992 | 3.933318 |
b2e1ffc0-099b-45d9-ba1a-a9d6debd63f0 | atodor/ProbGraphsExperiments | singh_large_main.cpp | #include "ProbGraphs/Graph.h"
#include "ProbGraphs/RandomGraph.h"
#include "ProbGraphs/DeterministicGraph.h"
#include "ProbGraphs/WeightedGraph.h"
#include "singh.h"
#include "standardizeGO_v5.h"
#include "ProbGraphs/match.h"
#include "files2.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <stdlib... | ALGO | 0.983971 | 4.950875 |
875005be-812d-4bf6-9fd3-04e1960faa8b | sarvex/leetcode-cyber | solution/1000-1099/1044.Longest Duplicate Substring/Solution.cpp | typedef unsigned long long ULL;
class Solution {
public:
ULL p[30010];
ULL h[30010];
string longestDupSubstring(string s) {
int base = 131, n = s.size();
p[0] = 1;
for (int i = 0; i < n; ++i) {
p[i + 1] = p[i] * base;
h[i + 1] = h[i] * base + s[i];
}
... | ALGO | 0.999989 | 5.334014 |
6bc54984-b73d-4eec-a8cd-5b33f7509ac9 | MelyCosti/Genesis-Eve | indra/llui/llkeywords.cpp | /**
* @file llkeywords.cpp
* @brief Keyword list for LSL
*
* $LicenseInfo:firstyear=2000&license=viewergpl$
*
* Copyright (c) 2000-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU Gene... | TOOL | 0.919295 | 5.894838 |
71a29fa2-e866-4611-94d1-5b27a5f30856 | getState/Algorithm | 코드플러스중급1/그리디/잃어버린괄호.cpp | #include <iostream>
#include <string.h>
#include <vector>
#include <string>
using namespace std;
string input;
int main()
{
cin >> input;
vector<char> opers;
vector<int> numbers;
string temp = "";
for (int i = 0; i < input.size(); i++)
{
if (input[i] == '+')
{
numbe... | ALGO | 0.999991 | 4.417573 |
73d4bed7-6841-476b-9424-0f0ac47b98a5 | kovaxis/progcomp | problems/icpc/wf2021_sim/a.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define repx(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) repx(i, 0, n)
#define invrepx(i, a, b) for (int i = b - 1; i >= 0; i--)
#define invrep(i, n) invrepx(i, 0, n)
#define cerr \
if (0) cerr
int W, H, K;
vector<vector<int>> def;
v... | ALGO | 0.999736 | 4.409835 |
8cee426f-fc05-4e7e-a225-83336d68ef6e | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_469_5.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 100001;
const int LOG = 20;
int a[MAXN];
long long dp[MAXN];
pair<long long, int> spt[MAXN][LOG];
int lg[MAXN];
int n;
void fast_io() {
ios::sync_with_stdio(false);
cin.tie(NULL);
}
pair<long long, int> RMQ(int lx, int rx) {
int j = lg[rx - lx + 1];
... | ALGO | 0.999957 | 3.709687 |
eea3c380-df9c-40fd-9912-446c858ab8a4 | t-feng/algorithm | SoHU0915/cal.cpp | /*
*/
#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
void cal(int n, int k)
{
int p = 0;
int res = 0;
vector<int> val;
for (int i = 0; k > 0; i++)
{
int tmp = pow(n, i);
val.push_back(tmp);
if (--k <= 0) break;
int len = val.size();
for (int j = 0; j < len - 1; j++)
{
... | ALGO | 0.999961 | 3.946694 |
2037bd26-d089-42cd-8a38-4399ddf5d4bc | hoanxuanbach/Competitive-Programming | OI/POI/27th/TRU.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
const int inf=1e16;
int cnt=0;
vector<int> p={2,3,5,7,11,13,17,19,23,29,31,37,41};
void backtrack(int cur,int x){
if(x==(int)p.size()){
cnt++;
return;
}
backtrack(cur,x+1);
while(cur<=inf/p[x]){
cur*=p[x];
... | ALGO | 0.999798 | 4.037829 |
4f0bef70-bd97-4521-bfa6-c88e509924a8 | voxel-ai/ByteTrack | deploy/ncnn/cpp/src/bytetrack.cpp | #include "layer.h"
#include "net.h"
#if defined(USE_NCNN_SIMPLEOCV)
#include "simpleocv.h"
#include <opencv2/opencv.hpp>
#else
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
#endif
#include <float.h>
#include <stdio.h>
#inclu... | DATA | 0.953141 | 5.700165 |
fc7677a5-c09f-4650-a9d6-d6fa5e64e8da | otavioon/COLA-2022-Tools | datasets/src/algo/codenet/2/s845051012.cpp | /*************************************************
*************************************************
*************************************************
*** _________________ | | | /***
*** | | | | / ***
*** | | | | / ***
*** |... | ALGO | 0.999779 | 3.902268 |
c449f4f2-24f1-4094-ade3-41ad5b089378 | AnkushSingh76/CSES | CSES/Sorting & Searching/sum_of_two.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, sum;
cin >> n >> sum;
vector<pair<int, int>> v(n);
for (int i = 0; i < n; i++) {
int temp;
cin >> temp;
v[i] = {temp, i};
}
sort(v.begin(), v.end());
int i = 0;
int j = n - 1;
while (i < j) {... | ALGO | 0.999951 | 4.369659 |
d9c96128-b70c-40a0-9b8d-ffe4ef9b011a | Hurtsok/data-structures | 1-task/network_packet_processing_simulation/process_packages.cpp | #include <iostream>
#include <queue>
#include <vector>
struct Request {
Request(int arrival_time, int process_time):
arrival_time(arrival_time),
process_time(process_time)
{}
int arrival_time;
int process_time;
};
struct Response {
Response(bool dropped, int start_time):
d... | ALGO | 0.999676 | 4.898972 |
85792765-8482-477d-9a19-1e6283e87925 | ozu-201/graph-puzzle-game-tm023756 | src/BFS.cpp | //
// Created by tm023756 on 12/21/2023.
//
#include "BFS.h"
#include <queue>
#include <unordered_set>
WordBFS::WordBFS(const WordGraph& graph) : graph(graph) {}
std::vector<std::string> WordBFS::findPath(const std::string& start, const std::string& end) {
std::queue<std::string> queue;
std::unordered_set<st... | ALGO | 0.999434 | 6.625218 |
7634e665-a723-41b0-a369-e820dd52c5fc | boran1999/proekt | chain.cpp | #include<vector>
#include<iostream>
#include<fstream>
#include "chain.h"
using namespace std;
chain::chain() {}
chain::chain(int a) {
Rational r(a);
num.push_back(r);
}
chain::chain(int a, int b) {
Rational r(a);
num.push_back(r);
Rational r1(1, b);
num.push_back(r1);
}
chain::chain(int a, int b,... | TOOL | 0.989016 | 3.358594 |
2b20efba-7cc8-4854-83e6-234e20d4f89b | Manav-Aggarwal/competitive-programming | CodeChef/Addition.cpp | #include<bits/stdc++.h>
using namespace std;
int a[100],b[100],carry,ans[101],n,tempc,i,temp[100],j,a_count,b_count;
int main()
{
char c;
c=0;
for(i=0;c != '\n';i++){
scanf("%1c",&c);
temp[i] = c-48;
a_count++;
}
temp[a_count-1]=0;
a_count=a_count-1;
for(i=0,j=a_c... | ALGO | 0.999887 | 3.261672 |
329b46ab-2ae5-4589-b48d-62b479a43b40 | britcoin3/britcoin3.1 | src/key.cpp | #include <map>
#include <openssl/ecdsa.h>
#include <openssl/obj_mac.h>
#include "key.h"
// Generate a private key from just the secret parameter
int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
{
int ok = 0;
BN_CTX *ctx = NULL;
EC_POINT *pub_key = NULL;
if (!eckey) return 0;
const EC_... | TOOL | 0.973902 | 7.221801 |
dc075a13-0520-40f9-8d39-1bb35aa620c7 | Wangld5/2018-SYSU-ComputerVision | 16340219王亮岛Ex3/检测直线/test.cpp | #include "EdgeDetect.hpp"
int main() {
string result, source, link;
cin>>source>>result;
int point, wind;
cin>>point>>wind;
EdgeDetect *edgeDetect1 = new EdgeDetect(source, result, point, wind);
system("pause");
return 0;
} | ALGO | 0.986849 | 3.673945 |
ea055ddf-fbbd-459b-95e0-7750657b1446 | Airikuh/cis200-Work | BSTPreorder.cpp | //Program That Constructs Binary Search Tree, Uses Preorder Traversal, and Searches For Specific Character
#include <iostream>
using namespace std;
//TreeNode Structure
struct TreeNode {
//Variable to Hold Character Information
char info;
//Pointers to Left and Right Children in Tree
struct TreeNode* left;
struc... | ALGO | 0.999989 | 5.889185 |
8cfa0ac9-b602-4a94-8457-33899f698f81 | ishan-backend/google-lc | 877-shortest-path-visiting-all-nodes/shortest-path-visiting-all-nodes.cpp | class Solution {
public:
int shortestPathLength(vector<vector<int>>& graph) {
int n = graph.size();
int allvis = (1<<n)-1;
// BFS
queue<pair<int, pair<int, int>>> q; // curnode -> {distance, current nodes travelled shown by mask}
set<pair<int, int>> vis; // states that have ... | ALGO | 0.999842 | 5.766588 |
9597fc0c-3e8f-4588-b2b1-0b32cd397bf8 | ArmanWali/C-Assignments | CS-3/2023129_3_3.cpp | #include <iostream>
using namespace std;
bool prime(int num){
if(num<=1){
return false;
}
for( int i=2; i<num; i++){
if (num%i==0){
return false;
}
}
return true;
}
void primenums(int start, int end){
cout<<"Prime numbers between "<<start<<" and "<<end<<" are... | ALGO | 0.996642 | 4.183111 |
e807ff73-4841-4259-b744-92da05f59ae8 | daviddeusalle/Codeforces | preparing_olympiad/main.cpp | #include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL));
using namespace std;
#include <climits>
int main()
{
fastread();
int n, l, r, x;
cin >> n >> l >> r >>... | ALGO | 0.999919 | 3.797346 |
542beae0-d029-4969-b5df-ff0b71268f2e | lsiddiqsunny/programming-contest | Codeforces/edu 55/4.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int edgeco[n+1];
vector<int>one;
vector<int>two;
int co=0;
for(int i=1; i<=n; i++)
{
cin>>edgeco[i];
co+=edgeco[i];
if(edgeco[i]==1)
one.push_back(i);
else
two... | ALGO | 0.999905 | 3.61829 |
375b7e36-b820-4c34-84e9-477a1e1d4d74 | DMoNex/Baekjoon | 5575/main.cpp | #include <iostream>
using namespace std;
int main() {
int start_h, start_m, start_s, end_h, end_m, end_s;
int result[3] = { 0 };
for (int i = 0; i < 3; ++i) {
cin >> start_h >> start_m >> start_s >> end_h >> end_m >> end_s;
result[0] = end_h - start_h;
result[1] = end_m - start_m;
result[2] = end_s - star... | ALGO | 0.999436 | 3.960269 |
e7a9932b-4655-4952-bfdd-06bdafc9067d | kushuu/competitive_programming_all | CodeChef/RECNDSTR.cpp | #include <bits/stdc++.h>
//shorts
#define ll long long int
#define sll stack<long long int>
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define MOD 1000000007
//program specific shorts (if any)
//
using namespace std;
int main()
{
fastIO;
ll T;
cin >> T;
while (T--)
{
st... | ALGO | 0.999958 | 4.6303 |
6372519f-254e-43d8-bb9d-b715155a9f1e | khushboochitre/artifact_rapid | llvm_rapid/lib/Transforms/IPO/HotColdSplitting.cpp | #include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/OptimizationRemarkEmitt... | TOOL | 0.998104 | 5.643939 |
d74799e7-5040-417c-9d5c-cb425713990b | andrew-canada/competitive-programming | codeforces/problems/1600/dp/777c-alyonaAndSpreadsheet/777c-sol.cpp | #include <cstdio>
#include <algorithm>
inline void read(int &a)
{
char c = getchar();
for (a = 0; c > '9' || c < '0'; c = getchar())
;
for (; c <= '9' && c >= '0'; c = getchar())
(a *= 10) += c - '0';
}
const int none = 1e8;
int A[110000], F[110000], Mx[110000];
/*第i行第j个元素就是(i-1)*m+j*/
int n... | ALGO | 0.999974 | 3.279642 |
0d6ad7d5-ba82-45b0-ac64-90121b31acf5 | salilab/imp | modules/multifit/src/anchor_graph.cpp | #include <IMP/multifit/anchor_graph.h>
#include <IMP/algebra/VectorD.h>
#include <IMP/core/XYZ.h>
#include <IMP/algebra/vector_search.h>
IMPMULTIFIT_BEGIN_NAMESPACE
ProbabilisticAnchorGraph::ProbabilisticAnchorGraph(
algebra::Vector3Ds anchor_positions)
: Object("ProbabilisticAnchorGraph%1%") {
GVertex u;
... | ALGO | 0.946521 | 5.814127 |
6ec3d6a4-4861-4d2e-bd9d-1d805f070505 | schnamo/test_keras | SequenceToProfile.cpp | //
// Created by Charlotte Tumescheit on 2021/06/08.
//
#include "SequenceToProfile.h"
#include <iostream>
#include <fdeep/fdeep.hpp>
#include <string>
#include <vector>
#include <numeric>
#include "simd.h"
// todo: error handling
// todo: run in parallel
SequenceToProfile::SequenceToProfile(int seqType, int maxLen... | ALGO | 0.886253 | 5.595813 |
5e11ce67-ad25-499e-b97d-b347add45f33 | OpenCAXPlus/OpenCAXPlus | OpenDigitalTwin-main/tools/cgal/examples/Envelope_2/envelope_circles.cpp | //! \file examples/Example_2/ex_envelope_circles.cpp
// Constructing the envelopes of a set of circles using the circle-segment
// traits.
#include <CGAL/Exact_rational.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Arr_circle_segment_traits_2.h>
#include <CGAL/Arrangement_2.h>
#include <CGAL/Envelope_diagram_1.h>
#inc... | ALGO | 0.999955 | 6.444358 |
e5ed7c50-8288-49f6-923f-21c47bb25798 | Zaidi-Alisha/OOP-Spring-2024 | Lab 2/question2.cpp | /**
*Programmer: Alisha Zaidi
*Date: 10 February, 2024
*23k-0025
*/
#include <iostream>
#include <vector>
#include <string>
using namespace std;
struct Book {
string title;
string author;
int year;
string genre;
Book(string t, string a, int y, string g) : title(t), author(a), year(y), genre(g... | TOOL | 0.996703 | 7.475337 |
7d2edf15-fab6-473c-8cb0-4adddc6ac68d | qweraqq/lineage-20-bionic | tools/versioner/src/DeclarationDatabase.cpp | #include "DeclarationDatabase.h"
#include <err.h>
#include <iostream>
#include <map>
#include <mutex>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <clang/AST/AST.h>
#include <clang/AST/Attr.h>
#include <clang/AST/Mangle.h>
#include <clang/AST/RecursiveASTVisitor.h>
#include <clang/... | TOOL | 0.851843 | 7.911474 |
fafc142a-f719-4084-943c-af0d2a9c5ac7 | MaxSamokhin/algorithms | module3/z3.cpp | #include <iostream>
#include <queue>
#include <stack>
/*
Дано число N < 10^6 и последовательность пар целых чисел из [-2^31..2^31] длиной N.
Построить декартово дерево из N узлов, характеризующихся парами чисел {Xi, Yi}.
Каждая пара чисел {Xi, Yi} определяет ключ Xi и приоритет Yi в декартовом дереве.
Добавление узла ... | ALGO | 0.999484 | 4.369273 |
463f8c12-22db-4071-ae58-26080756216f | smiti-maheshwari/VISem | compiler/compiler_lab_test/COD/COD/ll1_com_ghostyo.cpp | #include <bits/stdc++.h>
using namespace std;
#define For(i,a,b) for(i=a;i<b;i++)
#define Ford(i,a,b) for(i=a;i>=b;i--)
//#define Rep(i,c) for(__typeof(c.begin()) it(c.begin());i!=c.end();i++)
#define Rep(i,c) for(auto i=c.begin();i!=c.end();i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se sec... | ALGO | 0.999533 | 3.593441 |
6bea2009-77ca-4a34-8911-4671e1396b54 | Nasif-Imtiaj/Judge-Solutions | Lightoj Solutions/1153 - Internet Bandwidth.cpp | #include<bits/stdc++.h>
using namespace std;
///Welcome to Nasif's Code
#define co(q) cout<<q<<endl;
typedef long long int ll;
typedef unsigned long long int ull;
const int MOD = (int)1e9+7;
const int MAX = 1e6;
#define pi acos(-1)
#define bug cout<<"bug"<<endl;
#define bug2(var) cout<<var<<" "<<#var<<endl;
#define Fas... | ALGO | 0.999914 | 4.069724 |
ded6cca1-d531-4915-aebb-57ba1b549c9c | nahidhasan98/problem_solving | others/Cook a Dish.cpp | #include<bits/stdc++.h>
using namespace std;
#define FI freopen("in.txt","r",stdin);
#define FO freopen("out.txt","w",stdout);
int fact(int n)
{
if(n==0 || n==1)
return 1;
return n*fact(n-1);
}
int npr(int n,int r)
{
if(r==0)
return 1;
return fact(n)/fact(n-r);
}
int main()
{
F... | ALGO | 0.998555 | 4.355475 |
fd51e778-682e-42ff-abab-0a326522ad54 | BENDENG1/FourCppAlgorithmStudy | 2024_06/WEEK4/김진섭_백준_파도반 수열.cpp | #include <iostream>
#define ll long long
using namespace std;
int main() {
int T(0);
cin >> T;
ll P[101];
P[1] = P[2] = P[3] = 1;
int N(0);
for (N = 4; N <= 100; ++N) {
P[N] = P[N - 3] + P[N - 2];
}
for (int test_case = 1; test_case <= T; ++test_case) {
cin >> N;
cout << P[N] << '\n';
}
} | ALGO | 0.999938 | 4.048615 |
ac136418-4ec8-4060-8af2-7cfd08a7d236 | bc-dubs/DX12Starter | Mesh.cpp | #include "Mesh.h"
#include "DX12Helper.h"
#include <fstream>
#include <vector>
#include <DirectXMath.h>
using namespace DirectX;
Mesh::Mesh(Vertex* vertices, int vertexCount, unsigned int* indices, int indexCount)
: indexCount(indexCount)
{
Init(vertices, vertexCount, indices, indexCount);
}
Mesh::Mesh(const wchar... | TOOL | 0.851506 | 6.231732 |
b5d0c1ec-8b3a-46c5-9efe-f2438a956489 | poinco-gogo/md_alad | md_alad_ewald.cpp | #include <iostream>
#include <cstdlib>
#include <fstream>
#include <sstream>
#include <cmath>
#include <iomanip>
#include <ctime>
#include <random>
#include <chrono>
#include "common.hpp"
#include "Eigen/Core"
#include "Eigen/Geometry"
#include "Atom.hpp"
#include "PSF.hpp"
#include "PDB.hpp"
#include "LoadParm.hpp"
#i... | TOOL | 0.930115 | 4.644959 |
922c810d-7b1e-46ba-98d2-019415d6f7f8 | darshanpgohil/s | s/dfs 2/BINARY_T.CPP | #include<stdio.h>
#include<conio.h>
#include<stdlib.h>
struct node
{
int data;
struct node *left,*right;
};
struct node *root=NULL;
struct node* insert(struct node *root,int v);
struct node* createnode(int);
void inorder(struct node*);
struct node* findMin(struct node *root);
void main()
{
int ch,v;
clrscr();
... | ALGO | 0.999929 | 3.672433 |
dd21108a-2352-4fb4-8846-25375e2588cd | ishandutta2007/codeforces | a_fan_of_the_ak_king--lk/normal/1193/B.cpp | #include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;
int n,m,k,ch[10000005][2],root[200005],u,v,head[100005],Next[200005],adj[200005],i,siz[100005],day;
long long tree[10000005],lazy[10000005],lazy1[10000005],ans;
int d[100005],w[100005],p;
struct str{
int l,r;
long long x;
}seg[100005];
void ... | ALGO | 0.999961 | 3.654589 |
6b046d77-00fe-405c-8dc5-3b5c00122228 | Wasrek/POSN15 | POSN prac/1.25_B/1_Fluctuate.cpp | /*
Prac
TASK:Fluctuate
LANG: CPP
AUTHOR: KersaWC
SCHOOL: REPS
*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m,ans=0,i,num;
scanf("%d %d",&n,&m);
for(i=1;i<n;i++)
{
scanf("%d",&num);
if(num-m>ans)
{
ans=num-m;
}
... | ALGO | 0.999985 | 3.356176 |
2af9157e-5d1e-4e0a-9eb8-dfcb43cd77a2 | Div-agr/IPMP_25 | WEEK-2/LinkedLists/findStartPoint.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *detectCycle(ListNode *head) {
ListNode *fast=head;
ListNode *slow=head;
ListNode *entry=head;
... | ALGO | 0.999977 | 5.577269 |
5f3e9e12-06e9-41f7-b804-e9c606cc09fa | patchcoin/patchcoin | src/bench/bench_bitcoin.cpp | #include <bench/bench.h>
#include <clientversion.h>
#include <crypto/sha256.h>
#include <util/fs.h>
#include <util/strencodings.h>
#include <util/system.h>
#include <chrono>
#include <cstdint>
#include <iostream>
#include <sstream>
#include <vector>
static const char* DEFAULT_BENCH_FILTER = ".*";
static constexpr in... | TOOL | 0.865894 | 7.093809 |
7cf0421a-8903-4ad0-a091-9305de76d60d | KarlsruheMIS/KaMIS | extern/KaHIP/lib/partition/initial_partitioning/initial_refinement/initial_refinement.cpp | /******************************************************************************
* initial_refinement.cpp
*
* Source of KaHIP -- Karlsruhe High Quality Partitioning.
*
*****************************************************************************/
#include "initial_refinement.h"
#include "coarsening/coarsening.h"
... | ALGO | 0.999371 | 4.889031 |
74cd2dd1-0ae9-4d36-94ca-3cfdb60c695d | FranciscoThiesen/CompetitiveProgramming | CodeForces/CF1076-D12-C.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
#define rep(i,a,b) for(int (i) = (a); (i) < (b); ++(i))
#define mset(x, v) memset((x), (v), sizeof (x) )
#define buff() ios::sync_with_stdio(0);cin.tie(0)
#def... | ALGO | 0.998817 | 3.704639 |
78494f0e-a916-4b6a-ac8a-06ea157e6b49 | Anurag1008/DATA_STRUCTURES_AND_ALGORITHMS | DSA_SHEET/BIT_MASK_sheet/3.Bit_Difference.cpp | //https://practice.geeksforgeeks.org/problems/bit-difference-1587115620/1?utm_source=gfg&utm_medium=article&utm_campaign=bottom_sticky_on_article
//Bit Difference
/*
class Solution{
public:
// Function to find number of bits needed to be flipped to convert A to B
int countBitsFlip(int a, int b){
i... | ALGO | 0.999657 | 5.367692 |
77b5788e-117c-4053-a445-d8d87b25490d | JiHyeok-Kim/SAF-STUDY | 2022-10/221012 - A형 대비 SWEA 문제 풀이/221012_스터디_김지혁/#2112 [모의 SW 역량테스트] 보호 필름.cpp | #include <iostream>
#include <cstring>
using namespace std;
int D, W, K, mini;
int film[14][13][20]; // 0 : A, 1 : B;
bool used[13] = { false, };
void init()
{
//ʱȭ
mini = 21e8;
memset(film, 0, sizeof(film));
cin >> D >> W >> K;
for (int y = 0; y < D; y++) {
for (int x = 0; x < W; x++) {
cin >> film[0][y]... | ALGO | 0.999688 | 4.058787 |
44480a61-dff8-4c9a-8d56-47865f87d68b | crDroid-UL/android_frameworks_native | libs/input/InputDevice.cpp | #define LOG_TAG "InputDevice"
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <android-base/stringprintf.h>
#include <ftl/enum.h>
#include <input/InputDevice.h>
#include <input/InputEventLabels.h>
using android::base::StringPrintf;
namespace android {
static const char* CONFIGURATION_FILE_DIR[]... | TOOL | 0.916673 | 7.164014 |
a60226e7-3249-4dd7-8d93-c9b05c77ee60 | KarlPham/codeptit | EP07005.cpp | #include<bits/stdc++.h>
#include<iomanip>
using namespace std;
class Point{
private:
double x,y;
public:
void input();
friend void output();
friend double distance (Point&,Point&);
friend bool check(Point&,Point&,Point&);
friend double Chuvi(Point&,Point&,Point&);
};
void Point::input(){... | ALGO | 0.999557 | 4.86745 |
a22331d6-2c5d-4e38-82f6-7f646d1b748a | wlabs2016/travis-test | self-sdk/lib/boost_1_60_0/libs/spirit/classic/example/fundamental/number_list.cpp | ///////////////////////////////////////////////////////////////////////////////
//
// This sample demontrates a parser for a comma separated list of numbers
// This is discussed in the "Quick Start" chapter in the Spirit User's Guide.
//
// [ JDG 5/10/2002 ]
//
///////////////////////////////////////////////////////... | TOOL | 0.878039 | 7.075739 |
224c9d42-3cf6-4de6-a0e7-4f4e622e286e | gauravdev81/Code_With_Gaurav | Graphs/largestSum.cpp | #include<bits/stdc++.h>
using namespace std;
int solve(vector<int>& maze,int n)
{
int maxSum=-1;
for(int i=0; i<n; i++)
{
int node=i;
int sum=0;
unordered_set<int> visited;
while(node < n && node >= 0 && i!=maze[node] && visited.count(node)==0)
{
visi... | ALGO | 0.999974 | 3.990294 |
0561bced-bf4b-4ab6-b42d-e827450ff947 | Solunado/enginesim | src/gaussian_filter.cpp | #include "../include/gaussian_filter.h"
#include <cmath>
GaussianFilter::GaussianFilter() {
m_cache = nullptr;
m_cacheSteps = 0;
m_radius = 0.0;
m_alpha = 0.0;
m_exp_s = 0.0;
m_inv_r = 0.0;
}
GaussianFilter::~GaussianFilter() {
if (m_cache != nullptr) delete[] m_cache;
}
void GaussianF... | ALGO | 0.989961 | 6.710339 |
5d14258d-9b3f-44a9-8b06-bbc3d4411d25 | alinaamanzhol/pp1 | lab7/w.cpp | #include <iostream>
#include <map>
#include <vector>
#include <string>
using namespace std;
int main(){
int cnt1;
cin >> cnt1;
map<string, int> bugs;
for(int i = 0; i < cnt1; i++)
{
string bugname;
string weakness;
cin >> bugname >> weakness;
bugs[weakness]++;
... | ALGO | 0.995986 | 4.337774 |
bbee8a42-b99c-4517-a077-a73573939d77 | ishandutta2007/codeforces | romawhite/normal/414/C.cpp | #define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/stack:16777216")
#include <string>
#include <vector>
#include <map>
#include <list>
#include <iterator>
#include <set>
#include <queue>
#include <iostream>
#include <sstream>
#include <stack>
#include <deque>
#include <cmath>
#include <memory.h>
#include <cstdli... | ALGO | 0.999935 | 3.377331 |
7577852c-bb7f-43c9-a505-4a545f722255 | rohanmittal1163/algortithms | SegmentTree/3RMIQ.cpp | #include <bits/stdc++.h>
using namespace std;
class SegmentTreeMaxIndex
{
private:
vector<int> tree; // stores index of max element
vector<int> arr;
int n;
public:
SegmentTreeMaxIndex(const vector<int> &input)
{
arr = input;
n = arr.size();
tree.resize(4 * n);
build... | ALGO | 0.999982 | 5.512363 |
9bac6b9b-7e3f-4946-849f-9ec1166ea9e7 | Komal7209/YouTube-Komal-Pal | Leetcode_June_2022_Daily_Challenges/Day_7/Sol.cpp | // TC: O(n+m)
//SC: O(1)
class Solution {
public:
void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) {
int i =m -1, j=n -1, t = m+n-1;
while(i>=0 && j>=0){
if(nums1[i]>nums2[j]) nums1[t--] =nums1[i--];
else nums1[t--]=nums2[j--];
}
while... | ALGO | 0.99999 | 5.461574 |
6d08b617-a0cc-4d80-9a08-4008e07fbe59 | galtaman5274/social_networks | flutter_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.998007 | 6.76775 |
57e65234-bc88-4173-81ec-cd75721de9ae | Narcos101/Leetcode-Solutions | 1395-count-number-of-teams/1395-count-number-of-teams.cpp | class Solution {
public:
int numTeams(vector<int>& rating) {
int n = rating.size();
int ans = 0;
vector<int>smaller(n+1,0);
vector<int>larger(n+1,0);
for(int i = 0; i < n;i++){
int l = 0;
int s = 0;
for(int j = n-1; j > i;j--){
... | ALGO | 0.99999 | 5.365895 |
0eaab57e-c2cc-4985-8623-978b93e3a9f2 | alexrusev03/LeetCode-Problems | C++/99. Recover 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.999999 | 6.21478 |
394533a2-5738-45c0-970d-0011ed479ad7 | siddharth12s/LeetCode- | BFS of graph - GFG/bfs-of-graph.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to return Breadth First Traversal of given graph.
vector<int> bfsOfGraph(int V, vector<int> adj[]) {
// Code here
vector<int> ans;
unordered_map<int,bool> ... | ALGO | 0.999957 | 6.285475 |
d219fc5a-17cc-4753-b27f-0cfc0de6833f | tjtmf1/Study-Algorithm | Study-Algorithm/New Year and Curling.cpp | //http://codeforces.com/contest/908/problem/C
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main(void)
{
int n, r;
cin >> n >> r;
int x[1000];
double y[1000] = { r };
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 1; i < n; i++)
{
vector<int> v;
double max = r;
fo... | ALGO | 0.999997 | 3.391535 |
1fe996c4-a7de-406d-8066-45d4a3694f8a | jacksonchou2019/CRYENGINE | Code/Tools/MaxPluginTools/Source/MaxPluginUtilities/TriBox.cpp | /********************************************************/
/* AABB-triangle overlap test code */
/* by Tomas Akenine-Mller */
/* Function: int triBoxOverlap(float boxcenter[3], */
/* float boxhalfsize[3],float triverts[3][3]); */
/* History: ... | ALGO | 0.999717 | 7.741488 |
0ff0a378-0e39-48bc-af8c-27f4a97b2b3d | loggheader/imgproctest | union_find/partition.cpp | #include <opencv2/opencv.hpp>
#include "partition.hpp"
#include "UnionFind2D.hpp"
#include <algorithm>
#include <vector>
using namespace std;
using namespace cv;
bool is_black(const cv::Vec3b input)
{
return input[0] < ZERO_UPPER_LIMIT;
}
bool is_white(const cv::Vec3b input)
{
return input[0] >= ZERO_UPPER_LIMIT;
}... | ALGO | 0.984999 | 4.999832 |
10cbba82-b315-4d56-875d-d740ca21b85a | leilani-x/CrowdSimCityU | gazebo/deps/fcl/src/conservative_advancement.cpp | /** \author Jia Pan */
#include "fcl/conservative_advancement.h"
#include "fcl/collision_node.h"
#include "fcl/traversal_node_bvhs.h"
#include "fcl/simple_setup.h"
#include "fcl/motion.h"
#include "fcl/collision.h"
#include "fcl/traversal_recurse.h"
namespace fcl
{
template<typename BV>
int conservativeAdvancement(... | ALGO | 0.999413 | 5.752054 |
34eca484-6dcf-4a9e-b3f0-2f5d846cf32e | GreenSlimeStudios/projekt2-TP-Max-Berlinski-s203538-Marcin-Piechowski-s203889 | main.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <stack>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <chrono>
#include <cstdlib>
#include <ctime>
#include <string>
#include <stdexcept>
#include <algorithm>
#include <iomanip>
using namespace std::chrono_literals;
struct Ite... | ALGO | 0.973063 | 5.613011 |
07530cea-aab5-4849-a1cd-09a57b03ac5b | AkellaSummerResearch/p4_ros | src/trapezoidal.cpp |
#include "p4_ros/trapezoidal.h"
namespace trapezoidal {
void time_from_displacements(
const std::vector<double> &cumulative_displacement,
const double &max_vel, const double &max_acc,
std::vector<double> *times) {
// Time to get to max_vel from zero velocity
const double t_ud = max_vel/max_acc;
const uint... | ALGO | 0.998617 | 4.666521 |
e84badbe-0ba2-420b-bddc-4661a3ed44d9 | fdj32/fork_samples | cppreference/w/cpp/container/span/begin.cpp |
#include <span>
#include <iostream>
void print(std::span<const int> sp)
{
for(auto it = sp.begin(); it != sp.end(); ++it) {
std::cout << *it << ' ';
}
std::cout << '\n';
}
void transmogrify(std::span<int> sp)
{
if (!sp.empty()) {
std::cout << *sp.begin() << '\n';
*sp.begin() ... | TOOL | 0.998147 | 5.381232 |
c080186e-721d-49fb-83cf-246b3975ec55 | tobi-ha/CarND-Path-Planning | src/Eigen-3.3/doc/examples/make_circulant2.cpp | #include <Eigen/Core>
#include <iostream>
using namespace Eigen;
// [circulant_func]
template<class ArgType>
class circulant_functor {
const ArgType &m_vec;
public:
circulant_functor(const ArgType& arg) : m_vec(arg) {}
const typename ArgType::Scalar& operator() (Index row, Index col) const {
Index index = ... | ALGO | 0.998923 | 5.538595 |
39195e24-b5f3-448d-b05b-f024777d480e | antdkfa/LeetCode-Challenge | 2021/November/27-Product of Array Except Self.cpp | class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
vector<int> ans;
vector<int> pre, post;
ans.resize(nums.size());
pre.resize(nums.size());
post.resize(nums.size());
pre[0] = nums[0];
post[nums.size() - 1] = nums[num... | ALGO | 0.999977 | 6.223058 |
4dfdc56c-cb4c-41dd-ab70-f4e5826408ad | ishandutta2007/codeforces | maripium/normal/1468/H.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false); cin.tie(nullptr);
int T; cin >> T;
while (T--) {
[]() {
int N, K, M; cin >> N >> K >> M;
vector<bool> alive(N, false);
for (int i = 0; i < M; ++i) {
int a; cin >> a;
... | ALGO | 0.999986 | 4.258513 |
fc675926-3eb8-4fa8-8e81-5a8a5d4c459f | hemantkumar373/GFG-DSA-Solutions | Difficulty: Medium/Minimum Platforms/minimum-platforms.cpp | //{ Driver Code Starts
// Program to find minimum number of platforms
// required on a railway station
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to find the minimum number of platforms required at the
// railway station such that no train waits.
... | ALGO | 0.999986 | 6.003647 |
f8115753-c5cd-4b84-bb62-46d978e06f78 | durgaprasad-sahoo/my-dsa-track | Tree-2/check-balanced-BT-optimal.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.999901 | 6.611589 |
30fce30c-711f-4ce3-ae09-9a08c158fee9 | tazkhan24/Coding-Questions | 36-valid-sudoku/36-valid-sudoku.cpp | class Solution {
public:
bool isValidSudoku(vector<vector<char>>& board) {
int height=board.size();
int width=board[0].size();
vector<vector<int>> checkRow(height, vector<int> (width+1));
vector<vector<int>> checkCol(height, vector<int> (width+1));
vector<vector<int>> checkBox(heigh... | ALGO | 0.99977 | 6.825081 |
684dad54-e0bd-4324-996f-440a6d7f1dd5 | Ashutosh-Singh-10/LeetcodeQuestions | 2649-count-total-number-of-colored-cells/count-total-number-of-colored-cells.cpp | class Solution {
public:
long long coloredCells(int n) {
long long ans=1,x=4;
for(int i=1;i<n;i++)
{
ans+=x;
x+=4;
}
return ans;
}
}; | ALGO | 0.999991 | 4.955078 |
d4b0c013-ced7-4dda-9532-c0e8243a0ff9 | sayandodo1234/compe_codes | Graphs/AdvancedGraphs/new_year_transportation.cpp | // New Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1×n board. People live in cells. However, it was hard to move between distinct cells, because of the difficulty of escaping the cell. People wanted to meet people who live in other cells.
// So, user tncks0121... | ALGO | 0.999999 | 4.580547 |
c2ddd366-1626-4e9d-b99c-8b6f0bd52521 | satellitex/rupc2016 | TreeWalk/sate/main.cpp | #include<bits/stdc++.h>
using namespace std;
int N;
vector<int> G[100001];
bool used[100001];
bool dfs(int id,int cnt){
used[id] = true;
if( cnt == 0 ) return true;
for(int i=0;i<(int)G[id].size();i++){
if( used[G[id][i]] ) continue;
return dfs(G[id][i],cnt-1);
}
return false;
}
bool check(){
for(... | ALGO | 0.99999 | 4.801969 |
e43b28fa-aad1-4550-873c-e416d05aeb3c | Thalisson-Alves/Competitive-Programming | submissions/CodeForces/1700/a.cpp | #include <bits/stdc++.h>
#include <memory>
using namespace std;
#define dff(x) " [" #x "]: "
#define df(x) dff(x) << (x)
#define dfn(x) df(x) << '\n'
#define dfv(_x) dff(_x); for (auto _y: _x) cerr << _y << ' '; cerr << '\n'
#define all(x) x.begin(), x.end()
using ll = long long;
using ull = unsigned long long;
voi... | ALGO | 0.999828 | 5.02878 |
4cbeeca8-baf6-4473-97ed-f722341f7e5f | peer-open-source/xara | SRC/analysis/algorithm/equiSolnAlgo/accelerator/KrylovAccelerator2.cpp | // $Revision$
// $Date$
// $Source$
// Written: MHS
// Created: April 2002
// Description: This file contains the class implementation for
// KrylovAccelerator2.
#include <KrylovAccelerator2.h>
#include <Matrix.h>
#include <Vector.h>
#include... | ALGO | 0.964741 | 6.469605 |
52516677-95fa-4bd8-9f15-7e15d4aa089c | TrystanKoch/quantum-graph | src/real_find_roots.cpp | // In the spectral theory of Quantum Graphs, we often wish to find the
// eigenvalues of the graph. These eigenvalues are roots of the graph's
// characteristic function. For a lossless graph the characteristic function
// can be turned into a real function, however this involves additional
// operations in general, wh... | ALGO | 0.997664 | 4.168407 |
2396218a-647d-43b9-b396-3b622887d13a | Parakkrama24/sortingAll | Sorting_all/bobleSorting.cpp | #include"boblesorting.h"
void bobuleSorting::bubbleSorting(int arr[], int size)
{
{
bool isSawped = false;
for (int i = size - 1; i > 0; i--) {
for (int j = 0; j < i; j++) {
if (arr[j] > arr[j + 1]) {
isSawped = true;
sawapedfunc(arr, j);
}
}
if (!isSawped) {
break;
}
}
}
}
... | ALGO | 0.999498 | 4.071996 |
db7071d5-d94b-420c-8f21-2724f30eed6f | mashiro222/Graphics-Assignment-Llg | Homeworks/5_ARAP/code/code/67_王瑞程/src/Engine/MeshEdit/Paramaterize.cpp | #include <Engine/MeshEdit/Paramaterize.h>
#include <Engine/MeshEdit/MinSurf.h>
#include <Engine/Primitive/TriMesh.h>
#include <Basic/Geometry.h>
using namespace Ubpa;
using namespace std;
Paramaterize::Paramaterize(Ptr<TriMesh> triMesh) {
minSurf = MinSurf::New(triMesh);
this->triMesh = triMesh;
Init(triMesh);... | ALGO | 0.99597 | 5.192497 |
f0250e57-0077-4de0-ba6c-22794f1c3428 | ishandutta2007/codeforces | songc/normal/1479/D.cpp | #include <bits/stdc++.h>
#define pb push_back
#define lb lower_bound
#define fi first
#define se second
#define mup(a,x) a=min(a,x)
#define Mup(a,x) a=max(a,x)
#define INF (1ll<<62)
#define MOD 1000000007
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int... | ALGO | 0.999957 | 4.59686 |
8d94e2ab-1773-484d-bd3b-a55f5141ef2d | ganwenyao/opencv_js | opencv_contrib/modules/face/src/facemarkAAM.cpp | #include "precomp.hpp"
#include "opencv2/face.hpp"
namespace cv {
namespace face {
/*
* Parameters
*/
FacemarkAAM::Params::Params(){
model_filename = "";
m = 200;
n = 10;
n_iter = 50;
verbose = true;
save_model = true;
scales.push_back(1.0);
max_m = 550;
max_n = 136;
texture_max... | TOOL | 0.953035 | 4.884418 |
d9485dc4-b1f8-4c3f-8282-aa92edb1a6e0 | jk-jung/problem-solving | codeforces/Codeforces Round 49x/R496_div3_C.cpp | #include <cstring>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <set>
#include <map>
#include <array>
#include <stack>
#include <queue>
#include <vector>
#include <numeric>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef vector<i... | ALGO | 0.999858 | 4.104236 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.