uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
8bcd3fd3-2b5f-4c45-89b8-78954ca75bb2 | YangFengCodeCode/algorithm | leetcode_alg-3/leetcode_alg-3/Test.cpp | #define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
int firstMissingPositive(vector<int>& nums) {
int n = nums.size();
for (int i = 0; i < n; i++)
{
while (nums[i] > 0 && nums[i] <= n && nums[nums[i] - 1] != nums[i]... | ALGO | 0.999874 | 4.668837 |
88bbf1a6-7429-4c52-b40c-1723ffc74e14 | Gipbear/code-with-labuladong | 每日一题/2016.增量元素之间的最大差值.cpp | #include<bits/stdc++.h>
using namespace std;
/*
* @lc app=leetcode.cn id=2016 lang=cpp
*
* [2016] 增量元素之间的最大差值
*/
// @lc code=start
class Solution {
public:
int maximumDifference(vector<int>& nums) {
int minNum = INT_MAX, maxDiff = 0;
for(int n : nums){
maxDiff = max(maxDiff, n-minN... | ALGO | 0.99986 | 5.488109 |
8dce4a25-26c9-45c8-9ae8-6f48578bf443 | Jazib-720/PF | PF Programms/Q1.cpp | #include<iostream>
using namespace std;
int main()
{
int n,x,avg,sum=0;
cout<<"How many numbers you want to enter:"<<endl;
cin>>n;
cout<<"Enter numbers"<<endl;
for(int i=0;i<n;i++)
{
cin>>x;
sum+=x;
}
cout<<"sum is:"<<sum<<endl;
avg=sum/n;
cout<<"Average is:"<<avg<<endl;
}
| ALGO | 0.983134 | 3.306303 |
ab5a2035-8e17-4297-94d8-fa0ad4f47e28 | harpolea/swerve | gr_cuda.cpp | #include <iostream>
#include <string>
#include <cmath>
#include <fstream>
#include <algorithm>
#include "mpi.h"
#include "SeaCuda.h"
using namespace std;
/*
When the executable is called, if it is given an argument then this shall be used as the input file name. Otherwise it defaults to input_file.txt.
*/
int main(i... | ALGO | 0.994255 | 4.364719 |
2f5cae9e-3a27-4876-b120-c834eb3134a4 | dongjinjeon/readercoin | src/rpc/request.cpp | #include <rpc/request.h>
#include <fs.h>
#include <random.h>
#include <rpc/protocol.h>
#include <util/system.h>
#include <util/strencodings.h>
/**
* JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility,
* but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
* unspecified... | WEB | 0.881718 | 7.449615 |
061adc41-6b37-4624-a1c7-d6f29475b604 | Andy1819/CNS_Assignment_1 | prg7.cpp | #include <iostream>
#include <gmpxx.h>
using namespace std;
// Function to find the gcd and also find the coefficients x and y in the equation ax + by = gcd(a, b)
mpz_class extendedEuclidAlgo(mpz_class a, mpz_class b, mpz_class& x, mpz_class& y) {
if (b == 0) {
x = 1;
y = 0;
return a;
... | ALGO | 0.999953 | 5.44816 |
9fcf6b59-f2cb-43c2-9c2c-9229ad6eb227 | pranavmb/TLE-Submissions | SegmentTreesProblems/p19.cpp | // Ant Colony
#include<iostream>
#include<bits/stdc++.h>
#define lint long long int
using namespace std;
void preProcessGcd(vector<lint> & arr, lint n, lint logVal, vector< vector<lint> > & sparseTableGcd)
{
for(lint i = 0; i < n; i++)
{
sparseTableGcd[0][i] = arr[i];
}
for(lint i = 1; i <= lo... | ALGO | 0.999874 | 4.548416 |
aa15d176-10f8-4879-bca4-77003cfec892 | rishavranjandtu/DSA_Leetcode | 2352-equal-row-and-column-pairs/2352-equal-row-and-column-pairs.cpp | class Solution {
public:
int equalPairs(vector<vector<int>>& grid) {
int n=grid.size();
vector<vector<int>>v=grid;
int ans=0;
for(int i=0;i<n;i++)
{
for(int j=i;j<n;j++)
{
swap(v[i][j],v[j][i]);
}
}
for(i... | ALGO | 0.999985 | 5.821761 |
639de255-1726-457e-b510-fc80c2570999 | jcarreira/cirrus | src/Configuration.cpp | #include <Configuration.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <Utils.h>
namespace cirrus {
Configuration::Configuration() :
learning_rate(-1),
epsilon(-1)
{}
Configuration::Configuration(const std::string& path) :
learning_rate(-1),
e... | CONFIG | 0.862251 | 6.507676 |
32558a3a-9a12-48e1-88aa-5f8d41b9044b | utsaslab/RECIPE | P-ART/example.cpp | #include <iostream>
#include <chrono>
#include <random>
#include "tbb/tbb.h"
using namespace std;
#include "Tree.h"
void loadKey(TID tid, Key &key) {
return ;
}
void run(char **argv) {
std::cout << "Simple Example of P-ART" << std::endl;
uint64_t n = std::atoll(argv[1]);
uint64_t *keys = new uint64... | ALGO | 0.995172 | 5.92913 |
fcb99154-3883-48b0-bf2e-81befa6c3ff3 | Abhinav7076/My-Codes | Heap/“k” largest element in an array.cpp | class Solution{
public:
vector<int> kLargest(int arr[], int n, int k) {
// code here
sort(arr,arr+n,greater<int>());
vector<int> ans;
for(int i=0;i<k;i++)
ans.push_back(arr[i]);
return ans;
}
}; | ALGO | 0.999995 | 5.64565 |
eeefae01-224b-4eab-909e-dd3645eef99c | ishandutta2007/codeforces | evilbuggy/normal/1076/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
int main(){
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;
cin>>t;
... | ALGO | 0.99924 | 4.215192 |
1255f28f-1e45-4c50-9737-a5384dc8e498 | Mr-Bangladesh/Problem-Solving | Toph/Itsy's Magic Cards.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 9223372036854775806
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define PI 2*acos(0.0)
ll mod(ll B,ll M){ll X=B%M; if(X>=0) return X; else return M+X;}
///cin.ignore();
ll max(ll a,ll b) {if(a>b) return a; else return b... | ALGO | 0.999935 | 4.187481 |
8dfe590d-17d2-45d5-9fa0-bd744a2db360 | MuntahaFatima522/pd-7 | pd-op-t2.cpp | //PD7-OP-T2
#include<iostream>
using namespace std;
void printDiamond1(int rowSize);
void printDiamond2(int rowSize);
int main()
{
int rowSize;
cout<<"Enter desired number of rows: ";
cin>>rowSize;
rowSize=rowSize/2;
printDiamond1(rowSize);
printDiamond2... | ALGO | 0.999107 | 5.940872 |
ccc3c3e5-ff10-48f4-a092-60960bb18a1d | steffi4321/lex_omega_mdp | src/storm/storage/dd/bisimulation/PartialQuotientExtractor.cpp | #include "storm/storage/dd/bisimulation/PartialQuotientExtractor.h"
#include "storm/storage/dd/DdManager.h"
#include "storm/models/symbolic/Mdp.h"
#include "storm/models/symbolic/StandardRewardModel.h"
#include "storm/models/symbolic/StochasticTwoPlayerGame.h"
#include "storm/settings/SettingsManager.h"
#include "s... | ALGO | 0.964601 | 6.803507 |
a0a8cf15-8e22-4676-a3e9-e6ac6dfa0350 | Jikky1618/AtCoder | ABC/ABC100-149/ABC136/d-2.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include <debug_print.hpp>
#define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (static_cast<void>(0))
#endif
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed... | ALGO | 0.999946 | 3.556242 |
09d92ca1-0fd5-4fe3-8fd2-73317bd5f2d6 | raincross7/code-similarity | codes/train_code/problem164/problem164_372.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define M 1000000007
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);cout.tie(NULL);
int k;
cin >> k;
int a,b;
cin >> a >> b;
if(a%k==0||b%k==0){
cout << "OK" << endl;
}
else if(a/k<b/k){
cout << "OK" << endl... | ALGO | 0.999655 | 4.445401 |
53fbd01b-8268-4685-a08f-6c88b9a5f652 | XXY-CH/VSCode | Vim/t1.cpp | #include <iostream>
using namespace std;
int main(){
int n;
cin >> n;
for (int i = 1 ; i <= n ; i++) {
for (int j = 1 ; j <= i ; j++) {
cout << "你个大聪明";
}
cout << endl;
}
return 0;
}
| ALGO | 0.999584 | 3.304912 |
8f4aad96-fd27-4e81-bf6b-37ba83efb855 | rahul161616/Data-Structures-And-Algorithms | Cpp/Sort/ShellSort.cpp | #include <iostream>
using namespace std;
void shell_sort(int arr[], int n)
{
for (int gap = n / 2; gap >= 1; gap = gap / 2)
{
for (int j = gap; j < n; j++)
{
for (int i = (j - gap); i >= 0; i = i - gap)
{
if (arr[i + gap] > arr[i])
{
... | ALGO | 0.999684 | 4.224761 |
b88e2b70-21ac-4d5d-9401-6fe66a85faff | sweetswe/assignment-3 | decending order.cpp | /*Sort the elements of array in decending order */
#include<stdio.h>
int main()
{
int size,arr[50],i,j,temp;
printf("Input the size of array: ",size); //Enter the size of array.
scanf("%d",&size);
printf("Input %d elements in the array:\n",size);
for(i=0;i<size;i++){
printf("Element-[%d]:",i); //Get the input... | ALGO | 0.999954 | 3.724478 |
19178092-1d5a-4a52-b907-592bd5fac40e | Tinyshellzz/leetcode | Q0684. Redundant Connection_2.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <iostream>
using namespace std;
#include <vector>
#include <unordered_set>
#include "utils/to_string.h"
struct my_hasher {
size_t operator()(vector<int> const& v) const {
hash<int> ha;
size_t ret = 7;
... | ALGO | 0.99986 | 5.131662 |
9c442414-59f3-405b-bb4f-56a696a87e9b | baoxuezhao/GPU-suffixsort | host/Suffix.cpp | #include "../inc/Ref.h"
#include "../inc/Suffix.h"
#include "../inc/sufsort_util.h"
#include <iostream>
#include <string>
Suffix* Suffix::Instance(Ref* _ref, uint32 k = 8)
{
//memory mangement issue will be considered later
Suffix* suf = new Suffix(_ref, k);
return suf;
}
Suffix::Suffix(Ref* _ref, uint32 k)
{
... | ALGO | 0.949056 | 3.9263 |
78962126-114f-4c19-bd39-b12ce10e246f | sufykhan/Codeforces | 1695-maximum-erasure-value/1695-maximum-erasure-value.cpp | class Solution {
public:
int maximumUniqueSubarray(vector<int>& nums) {
int n=nums.size();
vector<int>pref(n+1,0);
for(int i=1;i<=n;i++){
pref[i]=pref[i-1]+nums[i-1];
}
map<int,int>mp;
int ans=0,start=0;
for(int i=0;i<n;i++){
if(mp.find... | ALGO | 0.999946 | 6.135537 |
eb1ec6c1-c30a-4548-9515-d42b3fd87996 | JohnVlBetter/LeetCode | 784.字母大小写全排列.cpp | /*
* @lc app=leetcode.cn id=784 lang=cpp
*
* [784] 字母大小写全排列
*/
// @lc code=start
class Solution {
public:
vector<string> letterCasePermutation(string s) {
vector<string> res;
dfs(res, s, 0, s.size());
return res;
}
void dfs(vector<string>& res, string& s, int idx, int size){
... | ALGO | 0.999175 | 6.628523 |
55fae93a-ff75-4b9a-9e9a-6b2e2df45744 | amanswami51/Oops_in_C_plus_plus_language | 04_Pointers.cpp | /*
#Pointer: A pointer is a variable which stores the address of another variable.
eg: int a=10;
int* b=&a;
cout<<"a give value of a : "<<a;
cout<<"b give address of a : "<<b;
#Reference variables: We create many names of single variable.
eg: float x=455;
... | ALGO | 0.989197 | 3.471485 |
d55b9321-fc6d-43b8-9f5d-97fb738b6457 | AyushAg2002/C- | Functions/Fahtocel.cpp | #include<iostream>
using namespace std;
float fahtocel(float fah){
float cel=5.0*(fah-32.0)/9.0;
return cel;
}
int main(){
float n;
cin>>n;
float ans=fahtocel(n);
cout<<"cel value is"<<ans<<endl;
} | ALGO | 0.996158 | 3.640342 |
910487fe-ee3f-4eed-8342-b20534495e30 | linkon63/programming_DSA_problem_solving | C3 Working with C plus plus/35.1 me-6.cpp | #include <iostream>
#include <deque>
#include <vector>
using namespace std;
vector<int> sortLadderArray(vector<int> arr) {
deque<int> dq;
for (int i = 0; i < arr.size(); i++) {
if (dq.empty() || arr[i] < dq.front()) {
dq.push_front(arr[i]);
} else {
while (!dq.empty() ... | ALGO | 0.99999 | 4.930378 |
994ab04f-f06d-464f-9d33-fd2dfc36f37c | xxzj990/qml-demo | QZXingDemo/QZXing/zxing/zxing/common/BitMatrix.cpp | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
#include <zxing/common/BitMatrix.h>
#include <zxing/common/IllegalArgumentException.h>
#include <iostream>
#include <sstream>
#include <string>
using std::ostream;
using std::ostringstream;
using zxing::BitMatrix;
using zxing::BitArray;
using ... | TOOL | 0.850051 | 6.887934 |
23070741-eec4-4338-ade1-f0e8550e1118 | Damian1410/PL.SPOJ.COM | Latwe/568.Zabawne_Dodawanie_Piotrusia/568.Zabawne_Dodawanie_Piotrusia.cpp | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
//bool palindrome_petla(int x);
bool palindrome(int x)
{
string num=to_string(x);
string num_R = num;
reverse(num_R.begin(), num_R.end()); //odwracanie za pomoc funkcji
if(num==num_R) return true;
else return false;... | ALGO | 0.999435 | 3.986167 |
9018ebc9-3a3c-49b6-8338-07271edda81a | ishandutta2007/codeforces | tsukiko_tsutsukakushi/normal/1433/E.cpp | /**
* author: otera
**/
#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<... | ALGO | 0.999883 | 4.503886 |
2dbe27b7-9b64-4821-ac61-2ddcc7b3ea10 | PX4/PX4-Autopilot | src/modules/fw_mode_manager/runway_takeoff/RunwayTakeoff.cpp | /**
* @file RunwayTakeoff.cpp
* Runway takeoff handling for fixed-wing UAVs with steerable wheels.
*
* @author Roman Bapst <<EMAIL>>
* @author Andreas Antener <<EMAIL>>
*/
#include <stdbool.h>
#include <stdint.h>
#include <math.h>
#include "RunwayTakeoff.h"
#include <mathlib/mathlib.h>
#include <px4_platform_co... | TOOL | 0.981936 | 7.104263 |
e71a61bc-3c41-4670-9221-4cbd39a70140 | Pratham228cmd/leetcode-DSA | 62-unique-paths/62-unique-paths.cpp | class Solution {
public:
int uniquePaths(int m, int n) {
vector<vector<int>> path( m , vector<int> (n, 0));
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
if(i==0 || j==0)
path[i][j]=1;
else
path[i][j]=path[i-1][j]+pat... | ALGO | 0.999923 | 6.231322 |
7e240939-9f64-431b-8dda-914613d50bb7 | ssatendra790/CP | Transfusion_Chain.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef unsigned long long ull;
#define pii pair<int, int>
#define pll pair<long long, long long>
#define vi vector<int>
#define vl vector<long long>
#define mpl map<long long, long long>
#define sl set<long long>
#define sc set<char>
#define printv(a) ... | ALGO | 0.999863 | 5.092159 |
d08d22eb-3616-4f92-ba92-4ff8ace72d93 | kjf412/GRAPHICS-EXPERIMENT | 实验五/KongJiFan_20201060295_work5.2.cpp | #include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<GL/glut.h>
using namespace std;
int window_width = 800, window_height = 600;
struct point
{
int x, y;
point(){}
point(int xx, int yy):
x(xx), y(yy) {}
};
vector<point> vertice; //顶点
float newcolor[3] = { 0, 1, 1 }; //... | ALGO | 0.995707 | 4.372757 |
d253d25c-956e-434d-98ea-6c6d3fc0a3c9 | guptabhagirath1522/CrackYourPlacement | Day 2/ValidParantheses.cpp | #include <iostream>
#include <string>
#include <stack>
using namespace std;
bool isValid(string s)
{
stack<char> st;
for (char c : s)
{
if (c == '(' || c == '{' || c == '[')
{
st.push(c);
}
else
{
if (st.empty() ||
(c == ')' &... | ALGO | 0.998757 | 6.590266 |
a9667a0c-143d-42a7-89ab-9cdb0dec4dbe | Clarus23/algorithm-training | boj/Lv2_silver/rank2/15663.cpp | #include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
int main(void) {
int n, m;
scanf("%d %d", &n, &m);
vector<int> arr(n, 0);
for(int i=0; i<n; i++) scanf("%d", &arr[i]);
sort(arr.begin(), arr.end());
do {
for(int i=0; i<m; i++) printf("%d ", ... | ALGO | 0.999889 | 3.472624 |
2eda8d9e-1bd6-43cf-a7f4-0fdd7e6bae5c | AfnanRakib/Y0ouKnowWho-code-library | Strings/String Hashing With Updates and Reverse.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
int power(long long n, long long k, const int mod) {
int ans = 1 % mod;
n %= mod;
if (n < 0) n += mod;
while (k) {
if (k & 1) ans = (long long) ans * n % mod;
n = (long long) n * n % mod;
k >>= 1;
}
return ans;
}
using T = ar... | ALGO | 0.999953 | 5.394956 |
965952b8-8a42-4efd-aa76-37ed93d16b99 | gyokkoo/Introduction-to-Programming-FMI-2017 | 1.Introduction-to-Programming-Practice/week-12/61-delete-element.cpp | /**
*
* Solution to exercises
* Introduction to programming course
* Faculty of Mathematics and Informatics of Sofia University
* Winter semester 2017/2018
*
* @author Gyokan Syuleymanov
* @idnumber 62117
* @task 61
* @compiler GCC
*
*/
#include <iostream>
bool isNumberInRange(int number, int a, int b)
{
return a... | ALGO | 0.997578 | 4.787658 |
fd62926d-ed91-480a-a2ad-ae8486d3f677 | raincross7/code-similarity | codes/train_code/problem094/problem094_10.cpp | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define ll long long
#define int long long
#define FOR(i, x, y) for(int i = x; i <= y; ++i)
#define pb push... | ALGO | 0.999181 | 3.834903 |
f38717d3-38e9-43f6-91da-3b9a9d3bca42 | ThMrCode/CodeForces_Solutions | round_925/round_925_div_3_problem_a.cpp | #include <iostream>
using namespace std;
int main(void) {
int array_n[100] = { 0 };
char array_string[3];
int t; cin >> t;
for (int i = 0; i < t; i++)
{
cin >> array_n[i];
}
for (int i = 0; i < t; i++)
{
for (int j = 2; j > -1; j--)
{
int n_aux = (array_n[i] - j);
if (n_aux > 26) n_aux = 26;
a... | ALGO | 0.999861 | 3.741478 |
9fc3656b-eb03-487d-a7c4-8955fc6825a8 | Anik-36/coding_in_laptop | phitron/C++/Basic Data Structure/Week 04-Stack and Queue/Module 16-Assignment 3/Special_Queries.cpp | #include<bits/stdc++.h>
#define endl '\n'
#define ll long long
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
using namespace std;
int main(){
int q;
cin>>q;
queue<string> s;
while(q--){
int n;
cin>>n;
if(n==0){
string a;
cin>>a;
s... | ALGO | 0.999621 | 4.388674 |
ac5db5f6-2826-4885-b779-09e31d535251 | mmroczka/data_structures_undergraduate_class | Program 3 - Highway Entourage to the Premier (Adjacency Matrix and Dijkstra)/main.cpp | /*
Michael Mroczka
CIS 3501
Professor Elenbogan
Code: Highway_Entrourage to the Premier_Program 3
Last updated: 3:47pm 3/25/15 to add comments
Description: When this program runs an adjacency matrix and can calculate the shortest path
in a directed graph from one node to another. It allows you to define a ... | ALGO | 0.99925 | 4.700765 |
4543b3d1-708a-4191-9141-364070f8274e | om-ashish-soni/Competitive-Programming | problemset/company_wise_problems/GOOGLE/Dynamic Programming/counting_bits.cpp | // problem link : https://leetcode.com/problems/counting-bits/
// solution : below code
const int M=1e5 + 10;
vector<int> dp(M,0);
bool isDpDone=false;
int getBits(int num){
bitset<20> bs(num);
return bs.count();
}
void countBitsDp(){
isDpDone=true;
for(int i=0;i<M;i++){
dp[i]=getBits(i);
... | ALGO | 0.999928 | 6.047155 |
3d20acff-498d-41be-9937-eb6bfbf21672 | Hemant4568/My-Code-Repository | 3158-find-the-xor-of-numbers-which-appear-twice/3158-find-the-xor-of-numbers-which-appear-twice.cpp | class Solution {
public:
int duplicateNumbersXOR(vector<int>& nums) {
int res=0;
map<int,int>mp;
for(int i:nums)
{
mp[i]++;
}
for(auto it:mp)
{
if(it.second==2)
res^=it.first;
}
return res;
}
}; | ALGO | 0.999985 | 5.459555 |
439308fa-7d86-4b95-a3bf-b49d4a56eba3 | ShubhS6/DSA | c/findintersectionofll.cpp | #include<iostream>
using namespace std;
class node{
public:
int data;
node* next;
node(int val){
data=val;
next=NULL;
}
};
void insert(node* &head,int val){
node* n = new node(val);
if(head==NULL){
head=n;
return ;
}
node* temp=head;
while(temp->n... | ALGO | 0.999969 | 3.998143 |
ed2ed305-bc7b-4cc8-92bc-bb9394bef2cd | orcun-gokbulut/ze-externals-sources | Source/libBullet/Source/Demos/ConvexHullDistance/ConvexHullDistanceDemo.cpp | ///
/// Convex Hull Distance Demo shows distance calculation between two convex hulls of points.
/// GJK with the btVoronoiSimplexSolver is used.
///
#include "GL_Simplex1to4.h"
#include "LinearMath/btQuaternion.h"
#include "LinearMath/btTransform.h"
#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolve... | ALGO | 0.999616 | 5.858723 |
660b11b3-084a-460b-ba12-5a01a1a2bba2 | hnno20525/2025_Cprogramming | p183.cpp | #include<stdio.h>
#include<stdlib.h>
#include<time.h>
int n=10,d[50];
int main(){
int i,j,t,min;
srand((unsigned int)time(NULL));
for(i=1;i<=n;i++){
d[i]=rand()%n+1;
}
for(i=1;i<=n;i++){
min=i;
for(j=i+1;j<n;j++){
if(d[j]<d[min]){
min=j;
}
... | ALGO | 0.999955 | 3.539453 |
744c8546-63f0-40a4-923a-21fc4e0855ba | dengyu9080/my_leetcode | cpp/Pascal's Triangle II.cpp | class Solution {
public:
vector<int> getRow(int rowIndex) {
vector<int>result(rowIndex+1,1);
for (int i = 1; i<=rowIndex/2; i++) {
result[i] = result[rowIndex-i] = int((long(result[i-1])*long(rowIndex-i+1))/i);
}
return result;
}
}; | ALGO | 0.999916 | 5.912673 |
da6c661b-8169-48d5-8a6d-3a427c65030c | jaspreeeet/cs104 | labs/make gdb lab 5/kets make a makefile/labDirectory/src/src1/comp.cpp | #include "comp.h"
#include <iostream>
int max(const std::vector<int>& v) {
int max = v[0];
for (int i : v) {
if (i > max) {
max = i;
}
}
return max;
}
int min(const std::vector<int>& v) {
int min = v[0];
for (int i : v) {
if (i < min) {
min = i;
... | ALGO | 0.974993 | 4.358878 |
1ba6fae2-9fd6-49fb-80a3-760f456acf58 | ntamero/Mining-Core | src/Native/libcryptonote/cryptonote_basic/miner.cpp | #include <sstream>
#include <numeric>
#include <boost/utility/value_init.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/limits.hpp>
#include "include_base_utils.h"
#include "misc_language.h"
#include "syncobj.h"
#include "cryptonote_basic_impl.h"
#include "cry... | TOOL | 0.895718 | 6.927856 |
c4a3e323-c0ab-4c0e-a58b-9e0b9eac2fed | stubbiali/meshsimplification | lib/Eigen/doc/examples/DenseBase_template_int_middleRows.cpp | #include <Eigen/Core>
#include <iostream>
using namespace Eigen;
using namespace std;
int main(void)
{
int const N = 5;
MatrixXi A(N,N);
A.setRandom();
cout << "A =\n" << A << '\n' << endl;
cout << "A(1..3,:) =\n" << A.middleRows<3>(1) << endl;
return 0;
}
| ALGO | 0.949042 | 3.245548 |
b4a31bf3-c59a-4116-960c-1548eb70b67a | GunioRobot/scribe-dependencies | boost_1_41_0/libs/math/example/negative_binomial_example2.cpp | // negative_binomial_example2.cpp
// Simple example demonstrating use of the Negative Binomial Distribution.
#include <boost/math/distributions/negative_binomial.hpp>
using boost::math::negative_binomial_distribution;
using boost::math::negative_binomial; // typedef
// In a sequence of trials or events
// (Berno... | ALGO | 0.980516 | 6.21082 |
3c1b7cf0-2b51-4e43-8457-21615cf29028 | anak1st/jnu-algorithm | src/4. greedy/report/BellmanFord.cpp |
/**
* @author: XiaFan
* @date: 2023-05-05 09:06
*/
#include <bits/stdc++.h>
#include <debug/vector>
using i64 = long long;
constexpr i64 inf = 1e9;
struct edge {
int a, b;
i64 c;
// friend bool operator<(const edge &lhs, const edge &rhs) {
// return lhs.c < rhs.c;
// }
};
const i64 N = 30... | ALGO | 0.999988 | 4.692091 |
20ac7ae0-a65e-40f2-8f53-0e5abe196b50 | C0ldSmi1e/CompetitiveProgramming | Contests/AtCoderKEYENCEProgrammingContest2023AutumnAtCoderBeginnerContest325/BWorldMeeting.cpp | /**
* Author: C0ldSmi1e
* Created Time: 2023-10-22 01:25:07
**/
// time-limit: 2000
// problem-url: https://atcoder.jp/contests/abc325/tasks/abc325_b
#include <bits/stdc++.h>
using namespace std;
#ifdef DANIEL_DEBUG_TEMPLATE
#include "../../debug.h"
#else
#define debug(...) 42
#endif
int main() {
ios::sync_with... | ALGO | 0.999964 | 5.050421 |
358157d6-7368-4f97-84e1-e80be1b17af8 | mrharsh06/DSA | Linkedlist/doubleinsertattail.cpp | #include<iostream>
using namespace std;
class Node{
public:
int data;
Node *prev;
Node *next;
//constructor
Node(int d){
this->data=d;
this->prev=NULL;
this->next=NULL;
}
};
void print(Node *&head){
Node *temp=head;
while(temp!=NULL){
cout<<temp->data<<" ";
temp=temp->next;
}
... | ALGO | 0.999575 | 4.447805 |
51a0dc0a-a6cc-47f7-a069-105f776c249e | hlc23/solve_record | leetcode/445. Add Two Numbers II.cpp | #include<bits/stdc++.h>
using namespace std;
struct ListNode{
int val;
ListNode *next;
ListNode(): val(0), next(nullptr){}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNo... | ALGO | 0.999976 | 5.96476 |
c0c900ca-0156-4745-95d9-0c30d590f3f9 | lingqing97/Leetcode_programming | No_0019.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* removeNthFromEnd(ListNode* head, int n) {
ListNode* node_1_behind=head;
ListNode* ptr=head;
int i=... | ALGO | 0.999987 | 5.857043 |
6d9661ff-3e2b-4eb4-bca7-30d6dea7ba24 | rks-031/DSA-codehelp-LB | Binary Search Tree/validate_bst.cpp | #include <bits/stdc++.h>
/*************************************************************
Following is the Binary Tree node structure
class BinaryTreeNode
{
public :
T data;
BinaryTreeNode<T> *left;
BinaryTreeNode<T> *right;
BinaryTreeNode(T data) {
this -> d... | ALGO | 0.999902 | 6.412943 |
5818e364-8bf3-4e13-9842-e571d8ebe0e4 | bbaah123/CPlusPlus | files/SOWC++EO9 Programming Challenge Solutions/Chapter04/4_10.cpp | // Chapter 4 - Programming Challenge 10, Bank Charges
// This program computes a bank customer's checking account fees for a month.
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
const double MO_FEE = 15.00; // Base monthly fee charged to all accounts
int numChecks; ... | TOOL | 0.911513 | 5.579241 |
9a7074e2-b73c-46bd-b114-602aa71adbd8 | K-jais/6Companies30Days | Intuit/8 boomerang.cpp | int numberOfBoomerangs(vector<pair<int, int>>& points) {
int out=0;
for (int i=0; i<points.size(); i++) {
unordered_map<int,int> map;
for (int j=0; j<points.size(); j++) {
int xdist = points[i].first-points[j].first;
int ydist = points[i].second-po... | ALGO | 0.999117 | 5.240308 |
b3f94831-c250-48d9-852c-a552d50b2567 | CreepySenpai/CreepyEngine | Engine/src/reactphysics3d/collision/shapes/TriangleShape.cpp | // Libraries
#include <reactphysics3d/collision/shapes/TriangleShape.h>
#include <reactphysics3d/collision/Collider.h>
#include <reactphysics3d/mathematics/mathematics_functions.h>
#include <reactphysics3d/collision/RaycastInfo.h>
#include <reactphysics3d/utils/Profiler.h>
#include <reactphysics3d/engine/PhysicsCommon.... | ALGO | 0.982104 | 7.687446 |
3ee9dbf7-8e0b-487f-8d8a-218ab5f2837f | saumyap48/cpp | Search_X_In_Sorted_Array.cpp | #include<bits/stdc++.h>
using namespace std;
int BinarySearch(vector<int>&arr,int x){
int low=0,high=arr.size()-1;
while(low<=high){
int mid=low+(high-low)/2;
if(arr[mid]==x){
return mid;
}
else if(arr[mid]<x){
low=mid+1;
}
else{
high=mid-1;
}
}
return -1;
}
int mai... | ALGO | 0.999851 | 6.174392 |
29b4e837-599d-4a75-90f0-b43d82cc5e4f | akshita2703/Leetcode | April/LinkedList/00_reversell.cpp | #include<bits/stdc++.h>
using namespace std;
// struct ListNode {
// int val;
// ListNode * next;
// ListNode():val(0), next(nullptr){}
// ListNode(int val):val(val), next(nullptr){}
// ListNode(int val, ListNode *next):val(val), next(next){}
// };
struct ListNode{
int val;
ListNode *next;... | ALGO | 0.998859 | 3.556847 |
93dccad0-3d21-4aa2-b3e8-d2b226b07e17 | MarcoVitoC/compnest | Codeforces/2023/November/AllAreSame.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> a(n);
int minValue = 1e7;
for (int i=0; i<n; i++) {
cin >> a[i];
minValue = min(minValue, a[i]);
}
int ans = 0;
for (int i... | ALGO | 0.999897 | 3.803077 |
488db2d0-f947-4ed4-9d97-63ad60bd6f8d | phiraphongph/Competitive-Programing | P056/P056.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
void dfs(char node, unordered_map<char, vector<char>> &graph, unordered_set<char> &visited) {
visited.insert(node);
for (char neighbor : graph[node]) {
if (!visited.count(neighbor)) {
... | ALGO | 0.999922 | 5.881494 |
a80e1721-7ade-46b6-b4ba-1d1486148295 | dev-morsalin-islam/Leetcode | merge2SortedArray.cpp | // C++ solution
// #include<bits/stdc++.h>
// using namespace std;
// problem link: https://leetcode.com/problems/merge-two-sorted-lists/
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x)... | ALGO | 0.9999 | 5.465841 |
b560739a-7ba5-4fa8-b13e-3fd5cce736e5 | danielapacella/RobotBasicFear | header_files/debug/parameters.cpp | /*
* parameters.c
/*
*/
#include "defs.h"
#include "public.h"
struct Parameter {
char *name; // the name of the parameter
char *folder; // the folder of the parameter
int type; // the type, 0=int
int n1; // the minimum value (for int on... | TOOL | 0.920672 | 3.390414 |
d4f5226e-377a-4fc0-bdf7-fc1d48284a52 | Ary0405/leetcode_problems | Heaps/kth_largest_in_array.cpp | // Problem - 215 (Kth Largest Element in an Array)
// Time Complexity - O(nlog(k))
// Space Complexity - O(k)
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int findKthLargest(vector<int> &nums, int k)
{
priority_queue<int, vector<int>, greater<int>> minHeap;
... | ALGO | 0.999946 | 5.476886 |
0ab43db4-c813-4fb2-a487-3b19fcca052e | Gold1010/veripool-with-nodejs | src/libraries/verilator/src/V3Order.cpp | #include "config_build.h"
#include "verilatedos.h"
#include "V3Order.h"
#include "V3Ast.h"
#include "V3AstUserAllocator.h"
#include "V3Const.h"
#include "V3EmitV.h"
#include "V3File.h"
#include "V3Global.h"
#include "V3Graph.h"
#include "V3GraphStream.h"
#include "V3List.h"
#include "V3OrderGraph.h"
#include "V3Parti... | ALGO | 0.990819 | 7.47875 |
e95a1ba2-e3b7-43c1-994c-62aa91af5ae7 | gedorinku/llvm-65816 | clang/test/ASTMerge/var-cpp/Inputs/var1.cpp |
template <typename T>
constexpr T my_pi = T(3.1415926535897932385L); // variable template
template <> constexpr char my_pi<char> = '3'; // variable template specialization
template <typename T>
struct Wrapper {
template <typename U> static constexpr U my_const = U(1);
// Variable template partial specializat... | TOOL | 0.955372 | 5.721531 |
e7c359ce-23d7-4a1c-a77e-96b68b70e865 | Bryan-Suelo/Algorithms_C_Cpp | cpp_interview_questions/adding_one_to_number_as_array_of_digits/main.cpp | #include<iostream>
#include<vector>
using namespace std;
void AddOne(vector<int>& digits) {
int index = digits.size() - 1;
while (index >= 0 && digits[index] == 9) {
digits[index--] = 0;
}
if (index < 0) {
digits.insert(digits.begin(), 1, 1);
}
else {
digits[index]++;
... | ALGO | 0.999701 | 6.134129 |
fab88f3a-6a00-4ad1-96e5-c44e1026286b | Raajokiaa-Ritu/Baiust_Intermediate_CP_BootCamp | vector.cpp | /*
vector:
push_back()
pop_back()
size()
empty()
operator[]
at()
front()
back()
begin()
end()
rbegin()
rend()
erase()
swap()
clear()
reverse()
sort()
*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
/... | ALGO | 0.999294 | 3.685837 |
e1f5f8c5-3628-4bc4-83b8-f060875beb5f | Damcy/LeetCode | Word_Ladder.cpp | // author: Ian
// create on: 2017-02-21
// email: <EMAIL>
// description: Word Ladder
class Solution {
public:
int ladderLength(string beginWord, string endWord, vector<string>& wordList) {
if (beginWord.size() != endWord.size()) {
return -1;
}
int str_len = beginWord.size();
... | ALGO | 0.999932 | 5.519001 |
7d84dd43-6b24-4b22-8414-fbea03ffe0d6 | DKLokeswaran/IPMP | Week 7/Stack/stack_using_queue.cpp | #include <iostream>
#include<queue>
using namespace std;
class Stack
{
queue<int> q1,q2;
int size;
public:
void push(int data);
int pop();
int peek();
bool is_empty();
};
bool Stack::is_empty()
{
return q1.empty();
}
void Stack::push(int data)
{
q2.push(data);
w... | ALGO | 0.998069 | 3.862792 |
b42018e5-8ad6-4474-8fdf-c03cc12ccf5c | mohitvdx/Programs | V_Creating_Expression_1.cpp | // Mohit Verma "mohitvdx"
// problem:
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int MOD = 1e9 + 7;
const int INF = LLONG_MAX >> 1;
int x,n;
void rec(vector<int> &a, int i, int sum){
if(i==n){
if(sum==x){
cout<<"YES";
exit(0);
}
r... | ALGO | 0.999994 | 4.489893 |
7bdfb042-7606-47dd-9a17-a334ee8c6cfd | cowienduckie/hust-applied-algorithm | Training_3/K03_CNK.cpp | #include <iostream>
#define ull unsigned long long
using namespace std;
//Global Variables
ull m = 0;
//Functions
ull pow(ull x, ull n){
x = x % m;
if (n == 1) return x;
if (n & 1) return ((pow((x * x) % m, n / 2) % m) * x) % m;
else
return pow((x * x) % m, n / 2) % m;
}
ull bignumMult... | ALGO | 0.999916 | 5.159966 |
86dfab59-2871-45f4-aad2-31b6cf64a50c | walkccc/LeetCode | solutions/1698. Number of Distinct Substrings in a String/1698.cpp | class Solution {
public:
int countDistinct(string s) {
const int n = s.length();
int ans = 0;
vector<long> pow(n + 1); // pow[i] := kBase^i
vector<long> hashes(n + 1); // hashes[i] := the hash of s[0..i)
pow[0] = 1;
for (int i = 1; i <= n; ++i) {
pow[i] = pow[i - 1] * kBase % kHas... | ALGO | 0.999922 | 6.09444 |
2e8b32c7-f0a1-4d00-b861-2df66404df68 | coolyuyuyu/leetcode | algorithm_1000-1999/1283-Find the Smallest Divisor Given a Threshold/main.cpp | class Solution {
public:
int smallestDivisor(vector<int>& nums, int threshold) {
int lo = 1, hi = *std::max_element(nums.begin(), nums.end());
std::function<bool(int)> checkLE = [&](int div) {
int sum = 0;
for (int num : nums) {
sum += std::ceil(num * 1.0 / d... | ALGO | 0.99995 | 6.563265 |
9f936f17-829d-4c12-9273-621fd73afad8 | dyrisingsunlight/Solutions-that-written-on-the-paper-code-set | POJ Roads in the North/Code.cpp | //Coded by Dy.
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define gc getchar()
#define pc(x) putchar(x)
inline int sc() {
int xx = 0, ff = 1; char cch = gc;
while(!isdigit(cch) && cch != EOF) {
if(cch == '-')
ff = -1; cch = gc;
}
while(isdigit(cch)) {
xx = (xx << 1) + (xx << 3)... | ALGO | 0.999695 | 3.976407 |
79092bb7-7b17-4279-a78b-b24d291db73b | vishalrawat1/DataStructure | 3.LINKED LIST/1_singlyll.cpp | #include<iostream>
using namespace std;
class Node{
public:
int data;
Node* next;
Node(int data){
this->data=data;
this->next=NULL;
}
//destructor;
~Node(){
int val = this->data;
if(this->next!=NULL){
delete next;
this->next=NULL;... | ALGO | 0.998711 | 3.85432 |
64617946-5267-4c50-8c05-5063cb3dd4e3 | VitBomm/codeforces-2020 | B/266B.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, t;
string s;
cin>>n>>t;
cin>>s;
for (int i = 0; i < t; i++) {
for(int i= 1; i< n; i++) {
if (s[i-1] == 'B' && s[i] == 'G') {
s[i] = 'B';
s[i-1] = 'G';
i++;
}
}
}
cout<<s;
return 0;
}
| ALGO | 0.999815 | 3.852755 |
a185308f-5e09-41e4-88fd-d9b96ab3bf83 | Prithvi04/Competitive-Coding | heap_sort.cpp | // { Driver Code Starts
// C++ program for implementation of Heap Sort
#include <bits/stdc++.h>
using namespace std;
// To heapify a subtree rooted with node i which is
// an index in arr[]. n is size of heap
void heapify(int arr[], int n, int i);
void buildHeap(int arr[], int n);
// main function to do heap sort
voi... | ALGO | 0.999849 | 5.968387 |
d1012b61-f1ec-43f8-b8ad-b75078144fe7 | stdstring/leetcode | Algorithms/Tasks.0501.1000/0845.LongestMountainInArray/solution.cpp | #include <algorithm>
#include <vector>
#include "gtest/gtest.h"
namespace
{
class Solution
{
public:
[[nodiscard]] int longestMountain(std::vector<int> const &arr) const
{
size_t mountainSize = 0;
size_t mountainStart = arr.size();
bool hasPeak = false;
for (size_t index = 1; ... | TEST | 0.998674 | 6.521279 |
f386448e-7286-4051-ad45-5ccaf2f968ba | iamsile/ACM | SDEX Code.cpp | #include <iostream>
using namespace::std;
int main()
{
char a[20];
while(cin >> a)
{
int i,n=strlen(a),b[20];
for(i=0;i<n;i++)
{
if(a[i]=='B'||a[i]=='F'||a[i]=='P'||a[i]=='V')
b[i]=1;
else if(a[i]=='C'||a[i]=='G'||a[i]=='J'||a[i]=='K'||a[i]=='Q'||a[i]=='S'||a[i]=='X'||
a[i]=='Z')
b[i]=2;
... | ALGO | 0.999678 | 3.656982 |
d273af40-9618-4ffa-96c7-9f5e55cfc959 | cstoribal/ComancheGoldEditor | core/qt/miscFunctions.cpp | //
// Created by phonix on 27/03/2020.
//
#include "miscFunctions.h"
bool sff::tools::normalizeNeighborhood(std::map<uint,std::map<uint,float>> & mapNeighbors){
for(auto & map : mapNeighbors){
float sum=0;
for(const auto & pair : map.second){
sum+=pair.second;
}
if(sum<... | TOOL | 0.95782 | 4.945724 |
87572b03-43d8-411a-a947-08658e8cd1a5 | gianmarcosilluzio/CompetitiveProgramming | CompetitiveProgramming/code/LargestEvenNumber.cpp | /*
* LargestEvenNumber.cpp
*
* Created on: 09 nov 2017
* Updated on: 08 jan 2018
* Author: Gianmarco Silluzio
* Problem: http://practice.geeksforgeeks.org/problems/largest-even-number/0
* Description Solution:
* The idea is convert input in digit array of number. Order array with ... | ALGO | 0.999652 | 6.14398 |
da40563c-484f-4809-a931-721e3f5b4129 | professorDeveloper/Cpp-Daily-Tasks | examTutorial2/task2.cpp | //
// Created by azamov on 10/1/2024.
//
#include <iostream>
using namespace std;
string replaceAtFirst(string s) {
string newStr = s.substr(s.length() / 2);
s.erase(s.length() / 2);
s.insert(0, newStr);
return s;
}
int main() {
string str = "maktab";
cout << replaceAtFirst(str) << endl;
}
| ALGO | 0.993578 | 3.752239 |
fe47d985-5009-47a4-aa88-b29f27bb9362 | ishandutta2007/codeforces | kostia244/normal/1303/C.cpp | #pragma GCC optimize("trapv")
#pragma GCC target("avx,avx2,ssse3,sse2,sse,fma,tune=native")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#include<bits/extc++.h>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
using namespace std;
using ll = long long;
using vi... | ALGO | 0.999995 | 5.049438 |
2b4e94b8-634c-44e1-b357-f4437e8a9521 | Juler115/Codeforces_Codes_Solutions | B. BerSU Ball.cpp | // Problem: B. BerSU Ball
// Contest: Codeforces - Codeforces Round 277.5 (Div. 2)
// URL: https://codeforces.com/problemset/problem/489/B
// Memory Limit: 256 MB
// Time Limit: 1000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include <bits/stdc++.h>
using namespace std;
int main()
{
cin.tie(0);
cout... | ALGO | 0.999952 | 4.297911 |
09575a3c-3ca8-4bbe-a9ef-0588d7c1e364 | andrewqt/Competitive-Programming | CodeForces/_0261_D_MaximAndIncreasingSubsequence/_0261_D_MaximAndIncreasingSubsequence.cpp |
// Problem : D. Maxim and Increasing Subsequence
// Contest : Codeforces - Codeforces Round #160 (Div. 1)
// URL : https://codeforces.com/contest/261/problem/D
// Memory Limit : 256 MB
// Time Limit : 6000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;... | ALGO | 0.99992 | 4.083334 |
ebd71e61-2791-4b7c-a2ff-00ca78ba4d61 | sjchanson/ITDP | sequentialCluster/ctsBase.cpp | #include "ctsBase.h"
ClusterVertex::ClusterVertex() : _name(""), _level(INT_MAX), _point(nullptr), _skew(0) {}
ClusterVertex::ClusterVertex(sequentialFlipFlop *flipflop) : ClusterVertex() {
_point = new Point<DBU>(flipflop->get_coord().x, flipflop->get_coord().y);
_name = flipflop->get_name();
}
ClusterVerte... | ALGO | 0.998903 | 5.135086 |
b40af233-5b2a-432c-9573-ea66639aecb8 | Mun09/TIL_Mun | codeforce/Arranging The Sheep.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n';
typedef long long ll;
const int MAX = 1000000+5;
int arr[MAX]={0,};
void solve(){
int n;
cin >> n;
string a;
cin >> a;
arr[0]=0;
if(a[0]=='*'){arr[0]++;}
for(int i=1; i<n; i++){
arr[i]=0;
if(a[i]=='*')
... | ALGO | 0.999424 | 3.708779 |
f9278f2d-dcb6-4c21-8a01-3bbd30b6150c | tstren1223/C-language-lesson | HW/HW6/LAB(6)-mockexam/LAB6(3).cpp | #include <stdio.h>
int main(){
long long gcd;
long long a,b,c,d;
while(scanf("%lld %lld %lld",&a,&b,&c)){
/*if(a>b)
while(a!=b){
a-b>b?a=a-b:(d=a,a=b,b=d-b);
//printf("a=%lld b=%lld c=%lld\n",a,b,c);
}
else{
while(b!=a){
(b-a>a)?b=b-a:(d=b,b=a,a=d-a);
//printf("a=%lld b=%lld c=%lld\n",a,b,c);... | ALGO | 0.999884 | 4.148308 |
2c6695e9-68d3-407e-8dea-651a5c5bbde3 | JonathanSalwan/Triton | src/examples/cpp/constraint.cpp | /*
** Output:
**
** RAX expr: (bvxor ((_ extract 63 0) SymVar_0) (_ bv287454020 64))
** constraint: (= (bvxor ((_ extract 63 0) SymVar_0) (_ bv287454020 64)) (_ bv0 64))
** Model:
** - Variable id : 0
** - Variable name: SymVar_0
** - Value : 11223344
**
*/
#include <iostream>
#include <triton/cont... | ALGO | 0.985167 | 6.633689 |
8b165496-c73a-454a-b372-5bcc51dd3813 | jaredramey/AutomationTest_Playground | Engine/Source/Runtime/Core/Private/Containers/BitArray.cpp | #include "Containers/BitArray.h"
#include "Math/NumericLimits.h"
void FBitArrayMemory::MemmoveBitsWordOrder(uint32* StartDest, int32 DestOffset, const uint32* StartSource, int32 SourceOffset, uint32 NumBits)
{
// Normalize Inputs
check(NumBits >= 0);
if (NumBits <= 0)
{
return;
}
ModularizeWordOffset(StartDes... | ALGO | 0.998044 | 7.023086 |
04ce1cd3-b05a-4aad-86d2-a87b8cc06e94 | mihaimoga/XMLSitemap | boost/libs/math/example/find_location_example.cpp | // find_location.cpp
// Example of finding location (mean)
// for normal (Gaussian) & Cauchy distribution.
// Note that this file contains Quickbook mark-up as well as code
// and comments, don't change any of the special comment mark-ups!
//#ifdef _MSC_VER
//# pragma warning(disable: 4180) // qualifier has no effe... | ALGO | 0.999855 | 6.407137 |
64c9a2b9-89a4-485e-bf73-8e6069fd3516 | MohamedAdel022/local_update_admin | 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 |
67b7a088-a461-4909-b1bc-d6cba83ea76b | duythong244/VuDuyThong_monC- | Chapter 10/Programming challenges/Challenges_17.cpp | #include <iostream>
#include <map>
#include <sstream>
// Chuyển đổi một ký tự thành mã Morse
std::string charToMorse(char ch) {
static const std::map<char, std::string> morseCode = {
{'A', ".-"}, {'B', "-..."}, {'C', "-.-."}, {'D', "-.."},
{'E', "."}, {'F', "..-."}, {'G', "--."}, {'H', "...."},
... | TOOL | 0.995273 | 6.240056 |
5a2feeb7-aa32-40a9-83ff-0dd499330692 | DavidePiccinini/thesis_Kimera_Gazebo | gtsam/gtsam_unstable/discrete/Scheduler.cpp | /*
* Scheduler.h
* @brief an example how inference can be used for scheduling qualifiers
* @date Mar 26, 2011
* @author Frank Dellaert
*/
#include <gtsam/base/debug.h>
#include <gtsam/base/timing.h>
#include <gtsam/discrete/DiscreteFactorGraph.h>
#include <gtsam_unstable/discrete/Scheduler.h>
#include <boost/tok... | ALGO | 0.962555 | 6.785619 |
19c3425f-1371-4cb0-bd4d-04a89470731b | Piousangel/ForCodingTest | 프로그래머스2단계/[3차]n진수게임.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
//처음 숫자배열을 만들면 편하다. 8/31
char number[18] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A',
'B', 'C', 'D', 'F'};
string number_to_n(int num, int n){
string result;
if(num == 0){
... | ALGO | 0.999688 | 5.383842 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.