uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
fce217c4-0a93-46cd-a646-00b70bdd8f74 | Muqniansyah/c-plus-plus | latihan/latihan-array.cpp | #include <iostream>
#include <iomanip> // Untuk setprecision
using namespace std;
int main() {
// program yang menghitung rata-rata usia yang berbeda
// Array yang menyimpan berbagai usia
int ages[8] = {20, 22, 18, 35, 48, 26, 87, 70};
// Variabel untuk menghitung rata-rata
float avg, sum = 0;
i... | TOOL | 0.989937 | 4.569447 |
13736514-4b6f-4c49-bb28-7e48d0a00d7e | arpan-dey-xo/GeeksForGeeks-POTD | 20-06-25.cpp | class Solution {
public:
bool validgroup(vector<int> &arr, int k) {
unordered_map<int, int> mp;
int n = arr.size();
for (auto it: arr){
mp[it]++;
}
if (n % k != 0) return false;
if (k == 1) return true;
sort(arr.begin(), arr.end... | ALGO | 0.999958 | 5.417829 |
363d4229-de49-4de4-937e-231233dd34ac | Anonymous-12-05/DSA-Qs | strings/countandsay.cpp | //https://leetcode.com/problems/count-and-say/
#include<bits/stdc++.h>
using namespace std;
string countAndSay(int n) {
if(n==1){
return "1";
}
if(n==2){
return "11";
}
string a="11";
for(int i=3;i<=n;i++){
string t="";
a=a+"&";
int c=1;
for(int j=... | ALGO | 0.999996 | 6.158315 |
dc8ce0fa-7170-42f9-83db-1b2859a9ee95 | gaoliangliang1996/LeetCode-100 | 104. 二叉树的最大深度.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.999861 | 6.514521 |
d58efb09-377a-4ff9-aa4e-1b2658a5e8af | dpvasani/Recursion | Print SubArray Re.cpp | #include <iostream>
#include <vector>
using namespace std;
// Function to print subarrays
void printSubArray(vector<int> &arr, int start, int end) {
// Base Case
if (end == arr.size()) {
return;
}
// One Case Solved
for (int i = start; i <= end; i++) {
cout << arr[i] << " ";
}
cout << endl;
/... | ALGO | 0.998245 | 5.819541 |
1277dc6d-6826-4f46-8182-d4085575aa8b | Mulab11/cntt2016-hw1 | TC-SRM-596-div1-250/grq.cpp | #include<bits/stdc++.h>
#define sqr(x) (x)*(x)
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define vi vector<int>
#define pb push_back
#define ld long double
#define mp make_pair
#define pii pair<int,int>
#define debuge puts("isok")
#define debug(x) cout<<#x<<"="<<x<<endl
#define SS seco... | ALGO | 0.999928 | 4.750984 |
c0bdda0a-8e8c-4101-8915-748d51ea855d | aaryagawade30/Competitive-Programming | CSES/Searching and Sorting/Sum_of_Two_Values.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, tg;
cin >> n >> tg;
vector<pair<int, int>> v(n);
for(int i = 0; i < n; i++) {
cin >> v[i].first;
v[i].second = i +1;
}
sort(v.begin(), v.end());
int i = 0, j = n -1;
while(i < j) {
int sum = v[i]... | ALGO | 0.999988 | 4.294253 |
b6c4f116-d2a4-4f24-8dc1-7b58fd9da375 | caohuy2705/DSA_new | 04022 ky tu thu k trong xau.cpp | #include <bits/stdc++.h>
using namespace std;
char tinh ( int n, int k) {
long long x=pow (2,n-1);
if (k==x) return 'A'+(n-1);
if (k<x) return tinh (n-1, k);
return tinh (n-1, k-x);
}
main () {
int t,n; long long k;
cin >> t;
while (t--) {
cin >> n >> k;
cout << tinh (n,k) << endl;
}
}
| ALGO | 0.999247 | 4.564138 |
5f6ec587-e318-46c5-ae37-942f6a48ae16 | ishandutta2007/codeforces | stevenkplus/normal/1483/C.cpp | // =========== Template ========== //
#include <bits/stdc++.h>
using namespace std;
int fastio() { ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); cin.tie(nullptr); return 0; }
int __fastio = fastio();
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p);
template<... | ALGO | 0.999988 | 4.164009 |
295ddc3a-6e21-4d28-bf03-1021f2c8f190 | abin02/100DaysOfCode | Day16/16.1.2_LengthOfLastWord.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
int lengthOfLastWord(string s)
{
int n = s.length();
int count = 0;
for (int i = n - 1; i >= 0; i--)
{
if (s[i] == ' ' && count != 0)
{
break;
}
... | ALGO | 0.999087 | 5.124292 |
c9ec34f9-d1e5-47c5-8784-4c27cde2da70 | ThatOneDamien/Ruby | Dependencies/glm/test/core/core_func_integer_find_lsb.cpp | #include <glm/glm.hpp>
#include <cstdio>
#include <cstdlib> //To define "exit", req'd by XLC.
#include <ctime>
int nlz(unsigned x)
{
int pop(unsigned x);
x = x | (x >> 1);
x = x | (x >> 2);
x = x | (x >> 4);
x = x | (x >> 8);
x = x | (x >>16);
return pop(~x);
}
int pop(unsigned x)
{
x = x - ((x >> 1) & 0... | ALGO | 0.998032 | 4.794778 |
b0365d13-b212-4f65-9ed9-7ba1d6eec76d | Bhagwankumarsingh/LeetCodeQuestions | 45-jump-game-ii/jump-game-ii.cpp | class Solution {
public:
int jump(vector<int>& nums) {
int n=nums.size();
int maxReach=0;
int currReach=0;
int jumps=0;
for(int i=0;i<n-1;i++){
maxReach=max(maxReach,nums[i]+i);
if(i==currReach){
jumps++;
currReach=maxRe... | ALGO | 0.999976 | 6.040092 |
772215a8-6f68-4680-8a09-b283a69c43fc | frkd-dev/algorithms | wu_ellipse+antialiasing.cpp | #include "ap.h"
/*-----------------------------------------------
This routines must be defined by the programmer:
void setpixel(int x, int y, double alpha);
-----------------------------------------------*/
void drawwuellipse(double x1, double y1, double x2, double y2);
/*******************************************... | ALGO | 0.999407 | 4.7562 |
da56dac9-7fe4-47f3-933d-5db99c410982 | yetanotherbot/leetcode | 221. Maximal Square/solution.cpp | #include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
inline int min_of_three(int a, int b, int c) {
return std::min(a, std::min(b, c));
}
int maximalSquare(vector<vector<char>>& matrix) {
int row = matrix.size();
if (row < 1) return 0;
int col... | ALGO | 0.999906 | 6.258026 |
37181a02-be73-4225-9d13-0c26c89f1bc8 | sking8484/skyline_IntroCPP | Mod3/carsCodingProject/carsCodingProject/main.cpp | #include <iostream>
#include <math.h>
using namespace std;
/*
Finding the distance between two cars from one point. The distance formula is ((X2-X1)^2 + (Y2 -Y1)^2)^(1/2)
Car A is traveling due west (-t*avg speed,0), car B is traveling due south (0,-t*avg_speed).
*/
int main() {
//time is in hours and mi... | ALGO | 0.995227 | 5.163421 |
82424123-945d-4812-96d9-252d3e43a637 | fadak9999/sqf_lite | 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 |
0d1c5be1-53e9-403e-9feb-bad3efa5a03a | mp290/ProgI | Esame di Laboratorio/Fail/Alfio_Spoto_1000025452.cpp | #include<iostream>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cmath>
using namespace std;
class AbstractRandomVec{
protected:
int* vec;
int num;
public:
AbstractRandomVec(int n, int min, int max):num(n){
vec = new int [num];
for(int i=0; i<num; i++){
vec[i]=rand()%(max-min+1)+min... | TOOL | 0.907791 | 3.995995 |
d03f5f6e-c859-4995-b5a6-e5aee54e8c0c | Khiem19/Reviews | voidPointer.cpp | #include <iostream>
using namespace std;
void printNumber(int* numberPtr) {
cout << *numberPtr << endl;
}
void printLetter(char* charPtr) {
cout << *charPtr << endl;
}
void print(void* ptr, char type) {
switch (type) {
case 'i':
cout << *((int*) ptr) << endl;
break;
... | TOOL | 0.97518 | 4.043947 |
30834da1-835e-4757-8037-6470678f47c7 | C0ldSmi1e/CompetitiveProgramming | Contests/CodeforcesCodeforcesRound920Div.3/B_ArrangingCats.cpp | /**
* Author: C0ldSmi1e
* Created Time: 01/15/2024 06:41:58 AM
**/
// time-limit: 2000
// problem-url: https://codeforces.com/contest/1921/problem/B
#include <bits/stdc++.h>
using namespace std;
#ifdef DANIEL_DEBUG_TEMPLATE
#include "../debug.h"
#else
#define debug(...) 42
#endif
int main() {
cin.tie(nullptr)->... | ALGO | 0.999926 | 5.822046 |
1627dde0-0348-4619-85d3-94a79fa061e1 | Sanaunggithub/kmitl_cpp | practice/for.cpp | #include <iostream>
using namespace std;
int main()
{
for(int i = 1; i<= 3; i++){
cout << "Happy New Year\n";
}
} | TOOL | 0.965363 | 3.190922 |
d9b06fa8-3621-4a11-88f1-aa3abcea8eb7 | druidream/competitive-programming | codeforces/1843/E. Tracking Segments/main.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define Rep(i, x, n) for (int i = x; i < n; i++)
#define rev(i, n) for (int i = n - 1; i >= 0; i--)
#define LSOne(S) ((S) & (-S))
#define roundUp(a, b) ((a + b - 1) / b)
#define print(x) cout << x << '\n';
#define printBool(x) ... | ALGO | 0.999716 | 4.265503 |
883c6c0d-9588-495a-9ca5-7c24f2128c0a | mhlucifer/Data-Structures-and-Algorithms | recursion/factorial_number.cpp | # include<iostream>
using namespace std;
int factorial(int n)
{
if (n == 0)
{
return 1;
}
else
return factorial(n - 1) * n;
}
int main()
{
int a = 5;
a = factorial(4);
cout << a << endl;
} | ALGO | 0.999908 | 3.983208 |
5cf450c1-48d7-45a0-925a-b43dd943d121 | hashcodez2004/DSA | Minimum cost to cut a stick--MEMOIZED.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
private:
int helper(int i, int j, vector<int>& cuts, vector<vector<int>>& dp){
if(i>j) return 0;
if(dp[i][j] != -1) return dp[i][j];
int mini = 1e9;
for(int ind=i; ind<=j; ind++){
int cost = (cuts[j+1]-cuts[... | ALGO | 0.999974 | 5.224699 |
e2c22952-70a0-4970-a8a7-78494556c309 | Nathaniel-Rodriguez/graphgen | graphgen/unweighted_undirected/cc.cpp | /*
* Most code that follows is Andrea's. I have made minor modifications to it.
* TODO: Clean up and refactor code.
* Sorry for inconvenience, it was this way when I found it.
*/
int common_neighbors(int a, int b, deque<set<int> > & en) {
if(en[a].size()>en[b].size())
return common_neighbors(b, a, en);
int... | ALGO | 0.999987 | 4.572156 |
bcb0a405-ba9c-4d54-9742-64472cb2fa28 | mohitkrsuman/DSAsheet | Day-6/implementstrStr().cpp | /*
28. Implement strStr()
Easy
3962
3638
Add to List
Share
Implement strStr().
Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
Clarification:
What should we return when needle is an empty string? This is a great quest... | ALGO | 0.999762 | 5.733507 |
b9c37649-cb4a-4bea-84bf-3a85ad96e9b4 | Srijanakash/Coding | LeetCode/Practice/SameTree.cpp | /*
Given two binary trees, write a function to check if they are the same or not.
Two binary trees are considered the same if they are structurally identical and the nodes have the same value.
Example 1:
Input: 1 1
/ \ / \
2 3 2 3
[1,2,3], [1,2,3]
Output: true
... | ALGO | 0.999983 | 7.261108 |
09954f38-55ae-453f-a3b1-a34a99de7ef4 | nlphacker/bavieca | src/common/alignment/ForwardBackwardX.cpp | #include "Alignment.h"
#include "ForwardBackwardX.h"
#include "HypothesisLattice.h"
#include "Numeric.h"
#include "PhoneSet.h"
#include "TimeUtils.h"
namespace Bavieca {
// constructor
ForwardBackwardX::ForwardBackwardX(PhoneSet *phoneSet, LexiconManager *lexiconManager,
HMMManager *hmmManagerAlignment, HMMManager... | ALGO | 0.995902 | 6.733889 |
977f2db6-7b34-489b-8bc3-577f1fadb744 | sionji/gem5 | src/systemc/tests/systemc/misc/user_guide/chpt4.1/stage2.cpp | /*****************************************************************************
stage2.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/*****************************************************************************... | ALGO | 0.998005 | 5.028528 |
1749514f-0404-43a9-9288-ae6dfb30599d | kiyotaka137/misis2024f-24-01-sainov-r-d | prj.codeforces/1678a.cpp | #include <iostream>
#include<vector>
#include<algorithm>
int main() {
int t = 0;
std::cin >> t;
while (t--) {
int c = 0;
int n = 0;
bool flag = false;
std::cin >> n;
std::vector<int> a(n);
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
std::sort(a.begin(), a.end());
c = count(a.begin(), a.end... | ALGO | 0.999449 | 4.008172 |
34d21aef-a1f1-49c8-8cdb-bdd43098eb65 | Mackenzie-98/Solutions | Codeforces/Div2/638/a.cpp | /**
* @author: Mackenzie
**/
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define F first
#define S second
#define forn(i, n) for (int i = 0; i < (int)n; i++)
#define pb push_back
#define fastIO ios::sync_wi... | ALGO | 0.999619 | 4.078876 |
1d5c3174-00fd-4244-9154-fe28845ac6b7 | ishandutta2007/codeforces | gary/normal/1517/E.cpp | /*
{
######################
# Author #
# Gary #
# 2021 #
######################
*/
#include<bits/stdc++.h>
#define rb(a,b,c) for(int a=b;a<=c;++a)
#define rl(a,b,c) for(int a=b;a>=c;--a)
#define LL long long
#define IT iterator
#define PB push_back
#define II(a,b) make_pair(a,b)
... | ALGO | 0.999931 | 3.811519 |
ce676ee2-8bb7-43cf-8302-cdc05094e977 | trannguyenducan/trannguyenducan_MonC | Chapter_9/Program13.cpp | // This program demonstrates a pointer to const parameter
#include <iostream>
using namespace std;
void displayValues(const int *, int);
int main()
{
// Array sizes
const int SIZE = 6;
// Define an array of const ints.
const int array1[SIZE] = { 1, 2, 3, 4, 5, 6 };
// Define an array of nonconst i... | TOOL | 0.994072 | 5.453076 |
6a8fdadd-43a0-4a05-9302-3f203516aa33 | gargsujal1/Leetcode-solutions | 1690-stone-game-vii/1690-stone-game-vii.cpp | class Solution {
public:
int ans(vector<int>& stones,vector<int> &prefix,int i,int j,vector<vector<int>> &dp){
if(i>=j){
return dp[i][j]=0;
}
if(i+1==j){
return dp[i][j]=max(stones[i],stones[j]);
}
if(dp[i][j]!=-1){
return dp[i][j];
... | ALGO | 0.999879 | 5.465392 |
4369a98d-69c1-4177-bb22-84773ad39782 | Md-Merazul-Islam/Basic-Data-Structures | module-17/inorder_traversal.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int val;
Node *left;
Node *right;
Node(int val)
{
this->val = val;
this->left =NULL;
this->right = NULL;
}
};
void inorder(Node *root)
{
if (root == NULL)
{
return;
}
inorder(root->... | ALGO | 0.999969 | 4.894511 |
0b238bf9-1df1-4aee-b7cc-04b7ef404e0a | kkeiper1103/3d-game-engine-thin-matrix | src/toolbox/Maths.cpp | //
// Created by kkeiper on 4/24/2022.
//
#include "Maths.h"
glm::mat4 Maths::createTransformationMatrix(const glm::vec3 &translation, float rx, float ry, float rz, float scale) {
glm::mat4 model(1.f);
model = glm::translate(model, translation);
model = glm::rotate(model, glm::radians(rx), glm::vec3(1, ... | ALGO | 0.994778 | 6.956798 |
fa7c9f9f-4240-4685-a35f-50d4103cec8c | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/Gemma/top0-100/serialize-and-deserialize-bst-Codec.deserializeHelper/177901_Overflow.cpp | _asn1_ltostr (long v, char *str)
{
long d, r;
char temp[LTOSTR_MAX_SIZE];
int count, k, start;
if (v < 0)
{
str[0] = '-';
start = 1;
v = -v;
}
else
start = 0;
count = 0;
do
{
d = v / 10;
r = v - d * 10;
temp[start + count] = '0' + (char) r;
c... | ALGO | 0.993233 | 4.23917 |
80b73af9-852c-4b40-b25f-6d4cf11a861d | AnasImloul/Leetcode-Solutions | scripts/algorithms/C/Count Unique Characters of All Substrings of a Given String/Count Unique Characters of All Substrings of a Given String.cpp | class Solution {
public:
int uniqueLetterString(string s) {
vector<vector<int>> counting(26);
int ans = 0;
// step 1: record the position for each char;
for(int curr = 0; curr < 26; curr++){
counting[curr].push_back(-1);
}
for(int curr = ... | ALGO | 0.999961 | 6.367437 |
968d0a6d-7c04-4223-932d-fa7580b51eda | DaniloHatz/beecrowd-cpp-solutions | Iniciante/1073-QuadradosDePares.cpp | #include <iostream>
int main()
{
unsigned short entrada;
std::cin >> entrada;
for (unsigned short i = 2; i <= entrada; i++)
if (i % 2 == 0)
std::cout << i << "^" << "2 = " << i * i << std::endl;
return 0;
} | ALGO | 0.998911 | 4.279037 |
d0eaba1b-b443-4332-9c11-162a4ef9e1c1 | y521263/LeetCode | LeetCode/AddTwoNumbers/AddTwoNumbers.cpp | //https://leetcode.com/problems/add-two-numbers/
#include<iostream>
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
void printlist(ListNode* l1)
{
ListNode* pl1 = l1;
while (pl1!= NULL)
{
std::cout << pl1->val << " -> ";
pl1 = pl1->next;
}
std::cout << std::endl;
}
... | ALGO | 0.999636 | 5.767437 |
056ae61f-3007-42f7-b04d-e4b98d055cac | pooyaww/Vivado_HLS_Samples | Adaptive_Filter/vhls/step2/tb_lib.cpp |
// Includes
#include <iostream>
#include <fstream>
using namespace std;
#include "tb_lib.h"
#include "lms_filter_top.h"
// Constructors
tb_lib::tb_lib(bool init_do_write_files, string init_desired_fname, string init_noise_fname, string init_output_fname, int init_num_samples_to_test)
{
num_samples_to_test = init_num... | TEST | 0.883509 | 5.906086 |
801d7244-14f4-454d-bd19-885d79bdb7f6 | ishandutta2007/codeforces | vepifanov/normal/203/D.cpp | #include <cstdio>
#include <numeric>
#include <iostream>
#include <vector>
#include <set>
#include <cstring>
#include <string>
#include <map>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <queue>
#include <sstream>
#include <deque>
using namespace std;
#define mp make_pair
#define ... | ALGO | 0.99918 | 3.323901 |
52b0e977-1a96-4041-8b95-2cad74440ca3 | sarvex/leetcode-free-pascal | solution/2000-2099/2096.Step-By-Step Directions From a Binary Tree Node to Another/Solution.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.999992 | 6.67611 |
64179007-eb6e-489c-9394-38f8dd45287a | metrixcreate/RepSnapper | Libraries/Boost1.40/libs/graph/example/degree_centrality.cpp | //[degree_centrality_example
#include <iostream>
#include <iomanip>
#include <boost/graph/undirected_graph.hpp>
#include <boost/graph/exterior_property.hpp>
#include <boost/graph/degree_centrality.hpp>
#include "helper.hpp"
using namespace std;
using namespace boost;
// The Actor type stores the name of each vertex... | ALGO | 0.998827 | 7.251747 |
be50a4e3-c1b1-45a7-a71a-fd8ca3547a8f | ishandutta2007/codeforces | lyc_music/normal/1667/B.cpp | //~~
#include<bits/stdc++.h>
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
#define int ll
#define N 500005
using namespace std;
inline ... | ALGO | 0.999978 | 3.846747 |
d14117fc-b642-4c66-b674-49edafb82bc7 | dbdxnuliba/quad-software | nmpc_controller/src/quad_nlp.cpp | #include "nmpc_controller/quad_nlp.h"
#include <cassert>
#include <iostream>
using namespace Ipopt;
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
// Class constructor
quadNLP::quadNLP(int type, int N, int n, int m, double dt, double mu,
double panic_weights, Eigen::Matr... | ALGO | 0.999663 | 5.350837 |
43a097eb-ea5e-4329-882c-f35eab18d822 | BABA-YAGAX71/DSA_searchNsort | searching/linearsearch.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int a[10];
for(int i=0;i<n;i++){
cin>>a[i];
}
int x,pos=-1;
cin>>x;
for(int i=0;i<n;i++){
if(a[i]==x){
pos=i+1;
break;
}
}
if(pos==-1){
cout<<"elment no... | ALGO | 0.999844 | 4.629753 |
ca5350ff-51a5-4218-8296-55f85fef3071 | duongdz96/Data_Structure_Algrothims_CODEPTIT | Tham lam/DSA03001.cpp | #include <bits/stdc++.h>
using namespace std;
#define ms(s, n) memset(s, n, sizeof(s))
#define all(a) a.begin(), a.end()
#define present(t, x) (t.find(x) != t.end())
#define sz(a) int((a).size())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORd(i, a, b) for (int i = (a)-1; i >= (b); --i)
#define pb pu... | ALGO | 0.999814 | 3.809096 |
9e7ebad7-4a0b-4988-86f1-935c5a6e915f | Gunter310/Introduccion-a-la-programacion | Practico 1 ejercicio 5.cpp | #include <iostream>
using namespace std;
int main() {
char x = 's';
char y = 'o';
printf("Antes del programa:\n");
printf("La variable x es %c\n", x);
printf("La variable y es %c\n", y);
// Intercambio de valores usando una variable temporal
char temp = x;
x = y;
y = temp;
pr... | ALGO | 0.984388 | 3.935687 |
827c1159-226c-4102-b098-f52d436c0eb6 | cainingw/gem5_adaptive_routing | src/systemc/tests/systemc/misc/v1.0/dash5/pulse.cpp | /*****************************************************************************
pulse.cpp -- Implementation of the pulse generator.
Original Author: Ali Dasdan, Synopsys, Inc.
*****************************************************************************/
/*****************************************************... | TOOL | 0.951417 | 6.259281 |
1031fc55-a4c8-45f1-a72b-af6baece5616 | nvnnv/Leetcode | 1433. Check If a String Can Break Another String.cpp | class Solution {
public:
bool checkIfCanBreak(string s1, string s2) {
sort(s1.begin(), s1.end());
sort(s2.begin(), s2.end());
bool f = true;
for (int i = 0; i < s1.size(); ++i)
{
if (s1[i] < s2[i])
{
f = false;
break;
}
}
bool f1 = true;
f... | ALGO | 0.999907 | 5.224004 |
67dcc1c3-6683-4e68-9d5c-f40d4dc08d9e | hashiryo/Library | test/yosupo/binomial_coefficient_prime_mod.test.cpp | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/binomial_coefficient_prime_mod
// competitive-verifier: TLE 1
// competitive-verifier: MLE 256
#include <iostream>
#include "src/Math/ModInt_Runtime.hpp"
#include "src/Math/FactorialPrecalculation.hpp"
using namespace std;
int main() {
cin.tie(0);
ios::... | ALGO | 0.999855 | 5.525198 |
d657c437-7138-45d9-950f-e3a106ce50b2 | bss9395/bss9395.github.io | _en/Computer/Algorithm/String/Backspace.cpp | /* Backspace.cpp
Author: BSS9395
Update: 2023-08-09T09:11:00+08@China-Guangdong-Zhanjiang+08
Design: String Backspace
*/
#include <string>
using namespace std;
class String {
public:
static auto _Backspace(const wstring& data, wchar_t back = L'\b') -> wstring {
auto reduce = wstring();
for (int i = 0; i < data.s... | ALGO | 0.95957 | 5.446594 |
6cbd9f82-0f91-4769-9057-b4385e85b930 | TranMinhHieu2/CODE-CTDL-GT | CTDL>/bac thang.cpp | #include <bits/stdc++.h>
using namespace std;
int m=1e9+7;
int tinh(int n, int k){
int f[100001]={0};
f[0]=1; f[1]=1;
for(int i=2; i<=n;i++){
for(int j=1;j<=min(i,k);j++){
f[i]=(f[i]+f[i-j])%m;
}
}
return f[n];
}
int main(){
int t, n,k;
cin>>t;
while(t--){
cin>>n>>k;;
cout<<tinh(n,k)<<endl;
}
} | ALGO | 0.999976 | 4.89618 |
3464d587-1f11-4ab0-bd36-7935eeadbc8d | ayoushman/c- | C-Plus-Plus-master/data_structures/binary_search_tree.cpp | /**
* \file
* \brief A simple tree implementation using structured nodes
*
* \todo update code to use C++ STL library features and OO structure
* \warning This program is a poor implementation - C style - and does not
* utilize any of the C++ STL features.
*/
#include <iostream>
struct node {
int val;
n... | ALGO | 0.99977 | 5.754892 |
77405180-13f2-415a-ad34-fc726e1b973f | emanueljuliano/Competitive_Programming | cf/cf_611/a.cpp | #include <bits/stdc++.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#define pb push_back
typedef long long ll;
int main(){ _
int t;
cin >> t;
while(t--){
int n, m;
cin >> n >> m;
n = n*60;
int ans = 1440 - n - m;
cout << ans << endl;
}
exit(0);
}
| ALGO | 0.99978 | 3.601104 |
8904bd66-dfec-4a8d-89bb-e6e62f20d247 | SaneaV/CEITI-Projects | C++ Labs/18.01.2018.4.cpp | //Сортировка методом вставок
#include <iostream>
using namespace std;
main()
{
setlocale (LC_ALL,"Rus");
cout<<"Введите количество элементов в массиве: ";
int n;
cin>>n;
int x[n];
for (int i=0; i<n; i++)
cin>>x[i];
int c=0;
int j;
for (int i=1; i<n; i++)
{
... | ALGO | 0.999956 | 3.539845 |
4581f96a-9cc0-4d7e-bc3e-4fce82a34c21 | sergio-strazzacappa/Twixt-PP | Make/Codingame.cpp | #include <bits/stdc++.h>
using namespace std;
void string_to_point(string s, char &x, int &y)
{
x = ' ';
y = 0;
int digit = 1;
int size = s.size();
for (int i = 0; i < size; i++)
{
if (s[i] >= 'A' &&
s[i] <= 'L')
{
x = s[i];
}
else if (s[... | ALGO | 0.999622 | 3.766913 |
45e85e62-b7bc-49bb-b3f4-2c46eb3e8fc9 | ernestognw/cpp-fundamentals | Estacionamiento/Estacionamiento.cpp | // Estacionamiento
// Ernesto García A00820783
// Creado en Fri Aug 31 17:21:46 CDT 2018
#include<iostream>
using namespace std;
int totalAPagar(int hrs, int mins)
{
// Defino la cuota mínima, y un contador de adicionales
const int cuotaMin = 20;
int contAdicional = 0;
// Si las horas son menos de 19, haz ... | ALGO | 0.99786 | 4.89133 |
2c518e6a-dc52-4a42-a490-63cc6980f4a8 | isha141/LeetCode | 0787-cheapest-flights-within-k-stops/0787-cheapest-flights-within-k-stops.cpp | class Solution {
public:
int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int k) {
vector<pair<int,int>>adj[n];
for(auto it: flights){
adj[it[0]].push_back({it[1],it[2]});
}
k+=2;
priority_queue<pair<int,pair<int,int>>,vecto... | ALGO | 0.999813 | 5.585706 |
83485d77-567b-4bfe-aaa4-5214ba91cb51 | ubAI6689/CodeForces | Practise/1000/A_Function_Height.cpp | // https://codeforces.com/problemset/problem/1036/A
#include <iostream>
typedef long long ll;
int main()
{
ll n,k;
std::cin>>n>>k;
// area of triangle is 1/2*base*height but since base == 2,
// so the area is always == height.
if (k<=n) std::cout<< 1;
else std::cout<<(k%n==0? k/n : k/n+1);... | ALGO | 0.999616 | 3.990637 |
cc2b99d7-ca62-4d46-aeb5-dd51ab1bb37b | alexandraback/datacollection | solutions_5648941810974720_1/C++/pulkitsinghal/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007LL
#define ll long long
string digits[] = {"ZERO", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE"};
int cnt[26];
void reduce(int i)
{
for(int j=0;j<digits[i].size();++j)
cnt[digits[i][j]-'A']--;
}
int main()
{
int t;
s... | ALGO | 0.99988 | 4.831468 |
8df5c6d4-1c92-4103-a789-6c88747b0243 | soolabettu/cp | code_forces/edu_110/c.cpp | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using vs = vector<string>;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vpi = vector<pair<int, int>>;
using vpl = vector<pair<ll, ll>>;
using ld = double;
#define sz(... | ALGO | 0.999992 | 5.114118 |
0d590f92-0d30-4b36-ab8e-e6f04609e707 | hfjn/Bachelorarbeit | dev/dependencies/opencv-2.4.9/modules/ocl/src/gftt.cpp | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... | ALGO | 0.999423 | 6.546618 |
28adf0fb-91a1-4d6b-b0b6-1cfc121d2482 | KevinIsYi/100-Days-Of-Code | CP/AtCoder/ABC/C/178C.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
template <typename T>
T ceil(T a, T b) {
return (a + b - 1) / b;
}
template <typename T>
T gcd(T a, T b) {
return b ? gcd(b, a % b) : a;
... | ALGO | 0.99987 | 4.259153 |
a9e57d8f-9195-440d-98fc-ae1931556cb6 | Owmicron/CPStuff | Atcoder/WhoSaysAPun.cpp | #include<bits/stdc++.h>
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#pragma comment(linker, "/stack:200000000")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef string str;
typedef... | ALGO | 0.999975 | 4.115101 |
5448e85d-1cd8-4c20-a240-367f58750076 | Chaplain0908/data_structure_algorithm | 3_Sorting/Merge.cpp | #include <iostream>
#include <vector>
#include <utility>
#include <math.h>
using namespace std;
vector<int> merge(const vector<int> &a, const vector<int> &b)
{
vector<int> result;
int i = 0;
int j = 0;
while(i < a.size() && j < b.size())
{
if (a[i] < b[j])
{
result.push_... | ALGO | 0.999689 | 4.652598 |
3e993bba-3ee3-4406-b595-5fd3f52022f1 | K111DK/opengauss-Multi-Tenancy-Buffer | src/gausskernel/runtime/executor/nodeLimit.cpp | #include "postgres.h"
#include "knl/knl_variable.h"
#include "executor/executor.h"
#include "executor/node/nodeLimit.h"
#include "nodes/nodeFuncs.h"
#include "instruments/instr_statement.h"
#define REPORT_LIMIT_THRESHOLD 5000 /* report cause_type's threshold for limit */
static TupleTableSlot* ExecLimit(PlanState* s... | ALGO | 0.977794 | 7.795572 |
92597b83-9b56-4f8b-bf8a-6f2832931181 | apolloLemon/Cpp | Derek_Banas_CppTut/vid03p02.cpp | #include <iostream>
#include <string>
#include <vector>
#include <numeric>
std::vector<int> Range (int start, int max, int step);
int main (){
std::vector<int> a = Range(1,10,1);
for(auto x: a) std::cout<<x<<std::endl;
return 0;
}
//FUNCTIONS
std::vector<int> Range (int start, int max, int step){
std::vector<i... | TOOL | 0.982869 | 3.548721 |
8364214e-6eb8-459d-b24f-b28a98e2c4af | TrepangCat/3D_Semantic_Subspace_Traverser | data_processing/isosurface/tbb/tbb-2018_U6/examples/parallel_for/tachyon/src/intersect.cpp | /*
* intersect.cpp - This file contains code for CSG and intersection routines.
*/
#include "machine.h"
#include "types.h"
#include "intersect.h"
#include "light.h"
#include "util.h"
#include "global.h"
unsigned int new_objectid(void) {
return numobjects++; /* global used to generate unique object ID's */
}
uns... | TOOL | 0.966848 | 5.815677 |
e60f2e1f-9dfd-4ad2-92c0-2948fb840699 | ExaScience/elprep-bench | cpp/string_slice.cpp | class string_slice {
public:
shared_ptr<string> storage;
int index, count;
string_slice () : storage(0), index(0), count(0) {}
string_slice (const shared_ptr<string>& s, int index = 0, int count = -1) :
storage(count == 0 ? 0 : s),
index(index),
count(count < 0 ? s->size()-index : count)
{}
string_slice ... | TOOL | 0.941085 | 5.560609 |
97d79c89-b538-4559-99a9-7f70ad08589c | youyoujushi/MOTDemo | bgslibrary/package_bgs/SigmaDelta.cpp | #include "SigmaDelta.h"
using namespace bgslibrary::algorithms;
SigmaDelta::SigmaDelta() :
ampFactor(1), minVar(15), maxVar(255), algorithm(sdLaMa091New())
{
applyParams();
std::cout << "SigmaDelta()" << std::endl;
setup("./config/SigmaDelta.xml");
}
SigmaDelta::~SigmaDelta()
{
sdLaMa091Free(algorithm);
... | TOOL | 0.884865 | 6.193874 |
8e43a128-e6b3-4deb-8d58-a2f87fa4fd22 | BIGbadEL/IMN | lab04/main.cpp | #include <array>
#include <cmath>
#include <functional>
#include <iostream>
constexpr double epsilon = 1.0;
constexpr double delta = 0.1;
constexpr std::size_t nx = 150;
constexpr std::size_t ny = 100;
constexpr double xmax = delta * nx;
constexpr double ymax = delta * ny;
constexpr double dx = 0.1 * xmax;
constexpr d... | ALGO | 0.999981 | 4.474837 |
63dca992-adb6-4375-83dd-9dc1d76a6ce0 | Israel-Eskape/C- | tortuga.cpp | #include<iostream>
using namespace std;
int derecha(int );
int izquierda(int );
void getcomands(int [][2]);
void mover(int abajo,int a[][20],int direccion,int distancia);
void imprime(int [][20]);
int main(){
int piso[20][20]={0},opcion,direccion = 0,comandoarreglo[100][2] = {0},distancia,count = 0;
bool plumaabajo ... | ALGO | 0.996205 | 3.218737 |
319a5bb2-8e59-486c-97a4-1178a6ab3e6a | lunw1024/OI | usaco/21-feb-plat/1.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
struct BIT {
vector<int> data;
BIT(int size) {
data.resize(size);
}
inline int lowbit(int x) {
return x & -x;
}
int query(int x) {
... | ALGO | 0.999893 | 4.522611 |
6421d73d-b4b7-4cee-982c-bdab76cc0348 | MaxElgart/CSCI-104 | Labs/lab9/sudoku.cpp | #include "sudoku.h"
#include <iostream>
using namespace std;
Sudoku::Sudoku(int puzzle[9][9]) {
for(int i = 0; i < 9; i++) {
for(int j = 0; j < 9; j++) {
board[i][j] = puzzle[i][j];
}
}
}
Sudoku::~Sudoku() {
}
void Sudoku::verify() {
for(int i = 0; i < 9; i++) {
for(int j = 0; j < 9; j++) {
... | ALGO | 0.996258 | 6.213967 |
2e50463d-063a-4cd5-aa5c-6debb5f258f0 | catacortazar/catalina_algo2012 | w4_vectorField/src/vectorField.cpp | #include "vectorField.h"
//------------------------------------------------------------------------------------
vectorField::vectorField(){
//inner dimensions of the field
fieldWidth = 70;
fieldHeight = 50;
}
//------------------------------------------------------------------------------------
void vect... | TOOL | 0.909082 | 3.519506 |
0983ae85-b695-45bb-8e05-e1112741b8ce | ishandutta2007/codeforces | jiangly/normal/1373/A.cpp | #include <bits/stdc++.h>
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int t;
std::cin >> t;
while (t--) {
int a, b, c;
std::cin >> a >> b >> c;
std::cout << (a < c ? 1 : -1) << " " << (1ll * a * b > c ? b : -1) << "\n";
}
return 0;
} | ALGO | 0.999617 | 4.898954 |
52f6b481-db74-4248-bc92-6163ac3d0452 | vnschneider/bug_search_ui | 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.998859 | 6.785645 |
d55807ea-4867-4f28-831d-ed10b48559da | Viktoria-db/labs | lab7/main.cpp | #include "functions.hpp"
int main() {
int n;
std::cout << "Введите размер матрицы (n<=100): ";
std::cin >> n;
int A[100][100];
zal::read_matrix(A, n);
int max_element, min_element;
zal::find_max_min(A, n, max_element, min_element);
if (max_element + min_element == 0) {
zal::s... | ALGO | 0.974346 | 4.539459 |
a189e649-41ff-4b1c-8920-d7dccf2a3f7d | Titus210/DATA-STRUCTURES-AND-ALGORITHM | Linked_List/Single/C++/Applications/Task Manager/task.cpp | #include <iostream>
using namespace std;
// create a class to hold task properties and methods and have a constructor that initializes the items in the task list. it should set items as private and getter and setter methods
class Task
{
private:
string task_name;
string task_description;
string task_priori... | ALGO | 0.995988 | 6.427776 |
45ce6faa-3330-4668-91e5-b633f3e6f69f | Yash-7827/DSA_Practice_codes | Stack_usingVectors.cpp | #include <bits/stdc++.h>
using namespace std;
struct Stack {
vector<int> vect;
void push(int val) {
vect.push_back(val);
}
int pop() {
if (isEmpty()) {
return INT_MIN;
}
int temp = vect.back();
vect.pop_back();
return temp;
}
int pe... | ALGO | 0.990643 | 4.549203 |
90f980b5-7df3-4043-94a9-b31a952f6965 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_test_75_8.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
const ll n_ = 2e5 + 100, inf = 1e18 + 1, mod = 1e9 + 7, sqrtN = 320;
ll dy[4] = {-1, 0, 1, 0}, dx[4] = {0, 1, 0, -1};
ll n, m, k, tc = 1, a, b, c, sum, x, y, z, w, base, ans;
ll gcd(ll x, ll y) {
if (!y... | ALGO | 0.999996 | 4.463908 |
86b79419-1673-40e2-ad21-d906f2a5aa1c | nmtoan883/OOP_28TECH | SLIDE/C++/Mang2Chieu/Bai30_DuongDiCuaQuanTinh.cpp | #include <bits/stdc++.h>
using namespace std;
int n , s , t ;
int dx[] = {1 , 1 , -1 , -1};
int dy[] = {1 , -1 , 1 , -1};
int res = 0;
int a[100][100];
void DFS(int i , int j)
{
a[i][j] = 1;
++res;
for(int k = 0 ; k < 4 ; k++)
{
int i1 = i + dx[k];
int j1 = j + dy[k];
if(i1 < 0 ... | ALGO | 0.999711 | 4.662342 |
2cf39ab7-f9d3-4ff3-a6ed-51b21550136c | u-noob-i/CSES-Problemset | Dynamic Programming/Removing_Digits.cpp | #include <bits/stdc++.h>
using namespace std;
void solve()
{
int n;
cin >> n;
vector<long long> dp(n + 1, 1e9);
dp[0] = 0;
for (int i = 1; i <= n; i++)
{
int x = i;
while (x)
{
dp[i] = min(dp[i], 1 + dp[i - x % 10]);
x /= 10;
}
}
c... | ALGO | 0.999833 | 4.63168 |
d5a196b6-0f24-4b43-8c62-d4dd53d95ff8 | kharchenkolab/leidenAlg | src/rigraph/core/community/walktrap/walktrap.cpp | /* -*- mode: C -*- */
#include "walktrap_graph.h"
#include "walktrap_communities.h"
#include "igraph_community.h"
#include "igraph_components.h"
#include "igraph_interface.h"
#include "../../core/exceptions.h"
#include "../../core/interruption.h"
using namespace igraph::walktrap;
/**
* \function igraph_community... | ALGO | 0.99962 | 7.611899 |
2b8ba689-cc9f-4ac0-8c5e-5148b64e10ad | gsool/alibaba-tblive-studio | plugins/win-dshow/libdshowcapture/source/dshow-enum.cpp | #include <stdlib.h>
#include <mutex>
#include "dshow-enum.hpp"
#include "dshow-formats.hpp"
#include "log.hpp"
#undef DEFINE_GUID
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
EXTERN_C const GUID DECLSPEC_SELECTANY name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7... | TOOL | 0.956406 | 5.894922 |
86e1ab8f-4a76-4449-91ad-d0e1dbd07dfe | jaypatil22/Leet-Code-Solutions | 1608. Special Array With X Elements Greater Than or Equal X.cpp | class Solution {
public:
int specialArray(vector<int>& nums) {
int res = -1;
sort(nums.begin(),nums.end());
int n = nums[nums.size()-1];
int pos = 0;
for(int i =0;i<=n;i++) {
while(nums[pos] < i)
pos++;
int a = nums.size()-(pos);
... | ALGO | 0.999973 | 5.307332 |
3a793fb3-c25c-4043-962b-69d2e9d2e011 | ipab-slmc/exotica | exotations/exotica_core_task_maps/src/avoid_look_at_sphere.cpp | #include <exotica_core/server.h>
#include <exotica_core_task_maps/avoid_look_at_sphere.h>
REGISTER_TASKMAP_TYPE("AvoidLookAtSphere", exotica::AvoidLookAtSphere);
namespace exotica
{
void AvoidLookAtSphere::UpdateAsCostWithoutJacobian(Eigen::VectorXdRefConst x, Eigen::VectorXdRef phi)
{
for (int i = 0; i < n_objec... | ALGO | 0.97363 | 6.677266 |
647aa57e-9382-40f0-97bb-817bf6d075cb | ishandutta2007/codeforces | jiangly/normal/1285/B.cpp | #include <iostream>
#include <vector>
#include <numeric>
int t, n;
std::vector<int> a;
void solve() {
std::cin >> n;
a.resize(n);
for (int i = 0; i < n; ++i)
std::cin >> a[i];
long long tot = std::accumulate(a.begin(), a.end(), 0LL);
long long sum = 0;
for (int i = 0; i < n - 1; ++i) {
... | ALGO | 0.99982 | 5.593122 |
1912a7d5-ad7e-4c12-aa0a-dac930fa01f8 | sayantan4321/LeetCode_solutions | Find the Prefix Common Array of Two Arrays.cpp | class Solution {
public:
vector<int> findThePrefixCommonArray(vector<int>& A, vector<int>& B) {
int n = A.size();
vector<int> arr(n);
unordered_map<int, int> mpp;
for(int i=0; i<n; i++){
int temp1 = A[i], temp2 = B[i];
int cnt =0;
mpp[temp... | ALGO | 0.999973 | 6.080606 |
0b17a140-5567-4d91-b370-d8f4547efaf0 | yokohamaa/livecoin | src/wallet/crypter.cpp | #include "crypter.h"
#include "crypto/aes.h"
#include "crypto/sha512.h"
#include "script/script.h"
#include "script/standard.h"
#include "util.h"
#include <string>
#include <vector>
#include <boost/foreach.hpp>
int CCrypter::BytesToKeySHA512AES(const std::vector<unsigned char>& chSalt, const SecureString& strKeyData... | TOOL | 0.90652 | 7.568019 |
79be0d90-23fb-4268-8f56-d9435f990334 | mas-bandwidth/cubes-old | shared/Simulation.cpp | #include "PreCompiled.h"
#include "Simulation.h"
#define dSINGLE
#include <ode/ode.h>
namespace engine
{
// simulation internal implementation
const int MaxContacts = 8;
struct SimulationImpl
{
SimulationImpl()
{
world = 0;
space = 0;
contacts = 0;
}
~SimulationImpl()
{
if ( contacts ... | ALGO | 0.961292 | 6.720502 |
8a978ebe-3231-43ec-b154-7e821e5bc1ac | HashirY/CodingNinjas-DsAlgo-cpp | Recursion/checkAB.cpp | #include <bits/stdc++.h>
using namespace std;
bool isAB(string s)
{
if (s.length() == 0)
{
return true;
}
if (s[0] == 'a')
{
if (s.substr(1).length() > 1 && s.substr(1, 3) == ("bb"))
{
return isAB(s.substr(3));
}
else
{
retu... | ALGO | 0.999658 | 4.097601 |
98ead3a9-014e-4c89-99cc-75d43d55b7c1 | ishandutta2007/codeforces | aidos/normal/1186/C.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <ctime>
#include <bitset>
#define pb push_back
#define ll long long
#define mp make_pair
#define f first
#define s second
#define pi... | ALGO | 0.999867 | 3.645259 |
d15398d8-5f2c-4604-8168-12f675ff445b | nhannhan2201/DSA_-Th- | Bai12.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
int n, m, s;
set <int> ke [1002];
int visited[1002];
void bfs(){
queue <int> q;
q.push(s);
visited[s]=1;
while (q.size()){
int u=q.front();
q.pop();
cout << u << " ";
fo... | ALGO | 0.99997 | 3.886522 |
7d3aa9b6-6b4a-455a-8d75-234be3174ff2 | Zalmotek/edge-impulse-arduino-k-way-outdoor-activity-tracker | arduino/libraries/Nicla_Sense_-_Weather_Prediction_inferencing/src/edge-impulse-sdk/tensorflow/lite/kernels/internal/quantization_util.cpp | #include "edge-impulse-sdk/tensorflow/lite/kernels/internal/quantization_util.h"
#include <algorithm>
#include <cmath>
#include <limits>
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/compatibility.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/cppmath.h"
namespace tflite {
namespace {
... | ALGO | 0.9951 | 7.623457 |
ea66680f-619e-4e0f-8bed-70f33b973238 | cdr-dave/cPlusPlus | 函数对象的容器/main.cpp | //
// main.cpp
// 函数对象的容器
//
// Created by cdr on 2022/5/5.
//
#include <algorithm> // std::sort
#include <functional> // std::less/greater/hash
#include <iostream> // std::cout/endl
#include <string> // std::string
#include <vector> // std::vector
#include <queue> // std::priority_queue
#include <m... | ALGO | 0.981934 | 4.632211 |
f212010c-ba0f-4d2d-9101-040f5032785b | borisvicena/cpp-projects | 2nd year/Objects_and_Classes/Objects_and_Classes/Objects_and_Classes.cpp | #include <iostream>
using namespace std;
class Car
{
public:
int rokVyroby;
string nazov;
bool automaticTransmission;
Car(int rokVyroby, string nazov, bool automaticTransmission)
{
this->rokVyroby = rokVyroby;
this->nazov = nazov;
this->automaticTransmission = automaticTransmission;
}
Car(in... | TOOL | 0.927995 | 4.545805 |
08adfb80-e6f4-4471-87be-3902f224fb44 | johnoneil/mupen64plus-web | boost_1_59_0/libs/heap/examples/interface.cpp | #include <iostream>
#include <iomanip>
#include "../../../boost/heap/fibonacci_heap.hpp"
using std::cout;
using std::endl;
using namespace boost::heap;
//[ basic_interface
// PriorityQueue is expected to be a max-heap of integer values
template <typename PriorityQueue>
void basic_interface(void)
{
PriorityQueue ... | ALGO | 0.981037 | 4.874002 |
cc76eb51-7a32-47df-8b53-916f349c1ee0 | zhanghaoxvan/cppkg | src/search.cpp | #include "../include/search.hpp"
#include "../include/update.hpp"
namespace cppkg::search {
void search(const std::string& term) {
try {
// Step 1: Update the package list and ensure the latest data is available
cppkg::update::update_packages_list(); // Now, the latest `lists` file... | TOOL | 0.887652 | 4.87498 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.