uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
58ca5207-6784-48e5-b8cf-110a33214c33 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_3070_8.cpp | #include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const int n = 6;
bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
return (a.second < b.second);
}
void solve() {
string s1, s2;
cin >> s1 >> s2;
string s3 = "";
int cnt = 0;
for (int i = 0; i < ((int)((s1).si... | ALGO | 0.999992 | 4.11236 |
22135cea-46b3-47ff-a7c8-e87a11c57895 | isspek/Hacker-Rank-Practices | C++/Introduction/variablesizearray.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int num_array,num_query;
cin>>num_array>>num_query;
vector<vector<int>> main_array;
for(int i=0;... | ALGO | 0.999799 | 3.879811 |
998f2ef2-27aa-4f28-89c9-c2f1eb777a79 | scanno/android_frameworks_av_shuttle | media/libstagefright/codecs/amrwb/src/interpolate_isp.cpp | /*
------------------------------------------------------------------------------
Filename: interpolate_isp.cpp
Date: 05/08/2004
------------------------------------------------------------------------------
REVISION HISTORY
Description:
---------------------------------------------------------------------... | ALGO | 0.999566 | 5.011387 |
e2848306-3318-4a0d-b21f-7906b9138b20 | minseobii/Baekjoon | problem archive/Greedy/게임을 만든 동준이.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <string>
#include <cmath>
using namespace std;
int N,ans,arr[100];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> N;
for... | ALGO | 0.999875 | 4.249665 |
00c184df-f5ae-4e96-bf4f-4e45a787a93d | GowthamR1011/LeetCode | AlgoMap/Binary Search/Find Minimum in Rotated Sorted Array/Solution.cpp | class Solution {
public:
int findMin(vector<int>& nums) {
int low = 0, high = nums.size() - 1,mid;
while(nums[low] > nums[high]){
mid = (low+high) /2 ;
if(nums[mid] > nums[mid+1])
return nums[mid+1];
if(nums[mid-1] > nums[mid])
... | ALGO | 0.999969 | 5.403141 |
41b1673e-39e3-4749-aa18-4f030c93923d | asadali512141/Function-Programs | (Program9) Write a program inputs two numbers and one arithmetic operator in main() function and passes them to a function. The function applies operator on two numbers on the basis of the operator enter..cpp | #include <iostream>
using namespace std;
// Function declarations
void cal(int s, int t, char ch);
int main()
{
int a , b;
char c;
cout<<"Enter first number , operator and second number." << endl;
cin>>a>>c>>b;
// Call the functions
cal(a,b,c);
return 0;
}
// Func... | TOOL | 0.876171 | 3.4928 |
e68dfeb4-e7e6-41d7-804f-72d73d118d03 | zmiarzynska/Structures-and-Algorithms | OnewayList/lista.cpp | #define N 5
#include <iostream>
using namespace std;
class Lista{
int tab[N];
int last;
public:
Lista(){
for(int i=0;i<=N;i++){
tab[i]=0;
}
last=0;
}
int First(){
return 0;
}
int END(){
return last+1;
}
int Next(int p){
if(p<last)return p+1;
retu... | ALGO | 0.998394 | 3.554392 |
bc31e902-50e6-4da1-b6ff-a42d293dce2a | GiuseppeBellamacina/Backup-Codici-Uni | Anno2/Semestre1/Algoritmi/Codici_Faro/List.cpp | #include <iostream>
#include <ctime>
#include <math.h>
using namespace std;
template <class T> class List {
public:
virtual List<T>* insert(T x) = 0;
virtual List<T>* del(T x) = 0;
virtual int search(T x) = 0;
};
template <class C> class Node {
private:
C key;
Node<C> *next;
public:
Node<C>(C key) {
... | ALGO | 0.993965 | 3.452897 |
8101ab41-f97a-43dd-9e95-f2862c9da6d5 | Soumyaxtech/DSA-Sheet | cpp programming/magicnum.cpp | #include<iostream>
using namespace std;
int main(){
int num,rem,sum=0;
cout<<"enter a number ";
cin>>num;
int x=num;
while(x>0 || sum>9){
if(x==0){
x=sum;
sum=0;
}
rem=x%10;
x=x/10;
sum=sum+rem;
}
if(sum==1){
cout<< num... | ALGO | 0.999622 | 3.936106 |
b8c743ea-59d2-439b-b127-88add9454278 | raincross7/code-similarity | codes/train_code/problem012/problem012_77.cpp | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define rrep(i,n) for(int i=1;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define maxs(a, b) a = max(a, b)
#define mins(a, b) a = min(a, b)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
co... | ALGO | 0.999963 | 3.909352 |
99e1659c-d806-4988-a8b1-35a9c028b04c | alexpizarroj/competitive-programming | src/leetcode/contests/weekly-53/C.cpp | #include <bits/stdc++.h>
using namespace std;
const int kInf = 1000000007;
const long long kLongInf = (long long)kInf * kInf;
using ii = pair<int, int>;
using iii = pair<int, ii>;
using vi = vector<int>;
using vii = vector<ii>;
class Solution {
public:
int n, m, nextId;
int numDistinctIslands(vector<vector<int>... | ALGO | 0.999918 | 5.650421 |
d4f48b7d-9a76-4b8a-ab27-d0da945b4ee0 | yun0529/Algorithm_study | lecture/ch9/ch9/1700.cpp | //#include <iostream>
//#include <algorithm>
//#include <vector>
//using namespace std;
//
////int cnt[104]
//int n, k, arr[104], x, lp, rp, ret;
//int a[104], visited[104], cnt;
//const int INF = 987654321;
//vector<int> v;
//
//int main() { // Optimal Page Replacement
//
// ios_base::sync_with_stdio(false);
// cin.ti... | ALGO | 0.999954 | 4.363716 |
b59a3c96-9d27-46fc-ac21-05564ba45d60 | Foysal-Munsy/Rush-Roadmap | Week-06/Day 06/codechef contest/D.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n, m;
cin >> n >> m;
vector<int> a(m);
for (int i = 0; i < m; i++)
cin >> a[i];
sort(a.begin(), a.end(), greater<int>());
int ans = 0;
for (in... | ALGO | 0.999917 | 4.686503 |
af19ddf3-9714-4130-ad84-f37b73519e1c | gentooza/GSResolver | resolver.cpp | #include "resolver.h"
resolver::resolver()
{
inst_cells = new cell* [sudoku_size];
inum_cells = sudoku_size;
for (int i=0; i < sudoku_size; i++)
inst_cells[i] = new cell();
vstatus.clear();
iround = 0;
inst_methods_manager = new methods_manager();
return;
}
resolver::~resolver()
{
for(int i = sudo... | ALGO | 0.997662 | 4.823268 |
f7697dc2-63bd-4012-85b9-8c83dd2b52b2 | mfmpc1/trifecta | FHEOffline/DistDecrypt.cpp |
#include "DistDecrypt.h"
#include "FHE/P2Data.h"
template<class FD>
DistDecrypt<FD>::DistDecrypt(const Player& P, const FHE_SK& share,
const FHE_PK& pk, const FD& FTD) :
P(P), share(share), pk(pk), mf(FTD), f(FTD)
{
vv.resize(pk.get_params().phi_m());
vv1.resize(pk.get_params().phi_m());
// extra limb f... | ALGO | 0.991434 | 4.840469 |
70854e54-fdca-435b-ad7d-689ba915c5da | vfolunin/archives-solutions | LeetCode/1719.cpp | class Solution {
public:
int checkWays(vector<vector<int>> &pairs) {
unordered_map<int, unordered_set<int>> pairsOf;
for (vector<int> &pair : pairs) {
pairsOf[pair[0]].insert(pair[1]);
pairsOf[pair[1]].insert(pair[0]);
}
int vertexCount = pairsOf.size... | ALGO | 0.999831 | 5.549212 |
c271c362-fd0d-42fa-87da-1a1afdefc30d | Soni-Shivam/CS101 | week12/powerofset.cpp | #include<iostream>
#include<vector>
using namespace std;
void generateSubsets(vector<char> arr, int i, int index, vector<char> scratch){
if (index ==arr.size()) {
for(char c: scratch) {
cout << c;
}
cout << endl;
}
else {
scratch.push_back(arr[i]);
genera... | ALGO | 0.99629 | 4.635915 |
8e63879d-352d-4dbb-87db-633cd6d30222 | vms2805/DSA2-SEM4 | infixtopostfix.cpp | #include <iostream>
//#include<bits/stdc++.h>
#include <stdlib.h>
using namespace std;
class Node
{
public:
char data;
Node *next;
};
class stack
{
private:
/* data */
Node *top;
public:
stack()
{
top = NULL;
}
void push(/* args */ char x);
char pop();
// int check_expre... | ALGO | 0.999795 | 5.178309 |
63d7a421-d2e6-4ba0-a398-3f55ecad7038 | UtopiaBeam/competitive | Codeforces/Problemset/463D Gargari and Permutations/463D Gargari and Permutations.cpp | #include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
vector<int> g[1002],tp;
queue<int> q;
int a[5][1002],n,m,t,d[1002],dp[1002],mx=0;
int main(){
scanf("%d %d",&n,&m);
for(int i=0;i<m;i++)
for(int j=0;j<n;j++){
scanf("%d",&t);
a[i][t]=j;
... | ALGO | 0.999919 | 3.692257 |
45ddcf2c-96df-4d50-b869-ac2e63fc5011 | jingtaozhang18/algorithm-exercises | leetcode/剑指 Offer(第二版)/面试题60. n个骰子的点数-完整二维数组.cpp | // https://leetcode-cn.com/problems/nge-tou-zi-de-dian-shu-lcof/
#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
vector<double> dicesProbability(int n) {
vector<vector<int>> dp(6*n+2, vector<int>(n, 0)); // [i][j]第j个骰子投完后,和为i出现的次数
vector<double> ans(5*n+1);
int i,j,k;
... | ALGO | 0.999717 | 4.840146 |
f85b6543-b6f6-4243-b234-b7cbbeef8989 | overflow218/Algorithms | 230622-1.cpp | #include <cstring>
class Solution {
public:
int cache[50000];
int find(int idx, vector<int>& prices, int fee)
{
if(idx == prices.size()) return 0;
int &ret = cache[idx];
if(ret != -1) return ret;
ret = find(idx + 1, prices, fee);
for(int i = idx + 1; i < prices.size()... | ALGO | 0.999727 | 4.681744 |
28a9ac79-cf73-48e0-902f-fa5bed4a793b | sachinsaw924/Leetcode | Array/PrefixRelated/2657. Find the Prefix Common Array of Two Arrays.cpp | class Solution {
public:
// solve it by own secondly little mistake i had done that i had not iterate
// it till 50 and after all everything is correct
// time complexity is O(n) * O(50) = O(n)*O(1)
// space complexity is O(n)
int solve(vector<bool>& vecA, vector<bool>& vecB) {
int count =... | ALGO | 0.999942 | 6.163846 |
244dc1f2-7ba2-4f94-8f04-4632d6b81c3d | Christopher-Emunah-Kim/ProgrammingStudy | ProgrammingStudy/ProgrammingStudy/Practice/950. Selection Sort.cpp | //#include <iostream>
//
//using namespace std;
//
///*
//
// value index
//3 5 2 1 4 1 3
//1 5 2 3 4 2 2
//1 2 5 3 4 3 3
//1 2 3 5 4 5 3
//1 2 3 4 5
//
//*/
//
//void printArray(const int array[], const int length)
//{
// for (int index = 0; index < length; ++index)
// {
// cout << array[in... | ALGO | 0.999881 | 3.774187 |
60f1421a-d5d9-4bc4-aac9-5b02ec65e55c | dlwlehd/BOJ_Cpp | Silver_2/16935.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(v) (v).begin(), (v).end()
#define sz(v) (v).size()
#define X first
#define Y second
typedef long long ll;
int n, m, r;
int board[102][102];
void input() {
ios::sync_with_stdio(0);
cin.tie(0);
}
void upDown() {
for (int i = 0; i < n / 2; i++) {
... | ALGO | 0.999943 | 4.444437 |
db5dca14-cefa-4030-b9d5-20efee5ca574 | auxtin/leetcodemaxxing | 1080-1200/[1151] 1460 - Make two arrays equal by reversing subarrays.cpp | // May 26 2024
// https://leetcode.com/problems/make-two-arrays-equal-by-reversing-subarrays/
// approach: it seems to be trivial but maybe would need to explain why its trivial. its trivial since using bubble sort, as long as `arr` has the same elements as `target` then you can eventually get it to look like each othe... | ALGO | 0.999956 | 6.312657 |
0b4ed5a4-b082-495c-8c61-4b2524cdc8ae | tanzir5/CompetitiveProgramming | LibraryFinal/RM/_MINE/Dynamic Programming/LIS_nlogk.cpp |
// LIS - O(nlogk)
int fast_lis(int *arr, int N) //Calculates lis_len of arr[1]...arr[N] and returns lis
{
int ret = 1;
vector<int> sq;
int i, lo, hi, mid;
sq.pb(arr[1]);
lis_len[1] = 1;
for(i = 2; i <= N; i++)
{
lo = 0;
hi = sq.size()-1;
if(num[i] <= sq[lo]) sq[lo... | ALGO | 0.999906 | 5.03969 |
376e1aaf-5712-4024-a1b1-63ccd5b95b17 | gilwonlee0/Algorithm | 줄기세포배양.cpp | #include <iostream>
#include <queue>
#include <functional>
#include <vector>
using namespace std;
const int fix = 330;
const int dr[] = { 0,0,-1,1 };
const int dc[] = { 1,-1,0,0 };
struct cell {
int timepassed, r, c;
};
struct cmp {
bool operator()(const cell &a, const cell &b) {
return a.timepassed < b.timepas... | ALGO | 0.999302 | 4.416166 |
d09d849f-1795-4549-ad59-42844ddf0f20 | taptipalit/dynpta | tools/llvm-xray/xray-account.cpp | #include <algorithm>
#include <cassert>
#include <numeric>
#include <system_error>
#include <utility>
#include "xray-account.h"
#include "xray-registry.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/XRay/InstrumentationMap.h"
#include "llvm/XRay/Trace.h"
using names... | TOOL | 0.918487 | 4.748868 |
0bbca5b0-bf8e-40d3-81a2-5f672b0b695b | dnyaneshwarpatange/datastructureandalgorithmlab | x5.cpp | #include <iostream>
#include <cstring>
using namespace std;
class node
{
public:
char word[20];
char meaning[20];
node *lptr;
node *rptr;
};
class Dictionary
{
public:
node *create_root(char word[20], char meaning[20])
{
node *root = new node;
strcpy(root->word, word);
... | ALGO | 0.997024 | 4.907578 |
88c160e8-fd66-42d7-8c6c-8280572d0a7c | raincross7/code-similarity | codes/train_code/problem096/problem096_96.cpp | #include<iostream>
#include<algorithm>
using namespace std;
int p[200000];
int main() {
//A
string s, t;
int a, b;
string u;
cin >> s >> t;
cin >> a >> b;
cin >> u;
if (s == u) {
a--;
}
else {
b--;
}
cout << a << ' '<< b << endl;
return 0;
//B
/*string s;
cin >> s;
int i;
for (i = 0; i < s.size... | ALGO | 0.999277 | 3.431209 |
6c518ceb-dfb0-4fb9-aa9d-bea9cfda92fa | ishandutta2007/codeforces | i_love_dasha_karpenko/normal/1166/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define DIM 200007
#define INF 10E16
#define MAXN 10000007
#define MODULO 1000000007
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pairll;
typedef ll arr[DIM];
typedef pairll parr[DIM];
typedef vector<ll> graph[DIM];
struct pp { ll a, b; };
ll n;
map... | ALGO | 0.999991 | 3.975682 |
cdab104b-f3ec-4c7d-898d-e5abfa4a5139 | hakureiR-eimu/LeetCode | 543diameterOfBinaryTree/src/main.cpp | #include <iostream>
using namespace std;
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... | ALGO | 0.999365 | 6.226941 |
ec469158-2497-421c-bd4f-253e067e1826 | migeed-z/ECOOP_main_artifact | torch/csrc/jit/passes/create_autodiff_subgraphs.cpp | #include <torch/csrc/jit/passes/create_autodiff_subgraphs.h>
#include <c10/util/Exception.h>
#include <torch/csrc/jit/ir/alias_analysis.h>
#include <torch/csrc/jit/ir/ir.h>
#include <torch/csrc/jit/jit_log.h>
#include <torch/csrc/jit/passes/canonicalize.h>
#include <torch/csrc/jit/passes/common_subexpression_eliminati... | TOOL | 0.855455 | 7.707692 |
c8a0b0d2-3dd2-48bf-88f4-b3183949d8b1 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_10896_1.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using cd = complex<float>;
ll base = 1000;
void fft(vector<cd>& a, bool inv) {
int n = a.size();
int bits = __builtin_ctz(n);
for (int i = 0; i < n; ++i) {
int x = 0;
for (int j = 0; j < bits; ++j) x = (x << 1) | (i >> j & 1);
if (i >... | ALGO | 0.999937 | 4.782185 |
51044c0b-5d6e-4770-9bfc-eb824b9a56a1 | masudranam/dsa_problems | Codeforces/D_Maximum_AND.cpp | #include<bits/stdc++.h>
using namespace std;
#define print(a) for(auto x:a)cout<<x<<' ';cout<<'\n';
#define debug(x) cout<<#x<<" "<<x<<'\n'
#define int long long int
const int M = 1e9 + 7;
const int N = 2e5 + 10;
void solve(){
int n; cin >> n;
vector<int> a(n), b(n);
for(auto &x : a) cin >> x;
for... | ALGO | 0.999902 | 4.416194 |
fd675937-a4d2-4726-b9f6-9a2aaaf95006 | 0-JackFrost-0/CS101-2025-Solutions | lab2/decimalToHexa.cpp | // Author: Om Godage
// Date: 19/1/25
#include<simplecpp>
main_program{
int n;
cin >> n;
int p = 0;
// pow(a, b), calculates a^b
while(pow(16, p) <= n){
p+=1;
}
// following the algorithm given step-by-step
p-=1;
while(p+1>0){
int power = pow(16, p);
if(powe... | ALGO | 0.999933 | 4.644569 |
5588e313-81d2-4d6f-b998-7f5c888307d1 | i-Rony/Competitve-Coding | Plates.cpp | /*
Google Kickstart 2020 Round A - Plates
Dr. Patel has N stacks of plates. Each stack contains K plates.
Each plate has a positive beauty value, describing how beautiful it looks.
Dr. Patel would like to take exactly P plates to use for dinner tonight.
If he would like to take a plate in a stack, he must also take a... | ALGO | 0.999629 | 4.615458 |
814a69ce-0d1e-4bb3-9442-c8663f1a94d6 | Volgarenok/spbspu-labs-2024-tp-a | baranov.pavel/T3/main.cpp | #include <iostream>
#include <functional>
#include <fstream>
#include <vector>
#include <iterator>
#include <algorithm>
#include <map>
#include <string>
#include <iostream>
#include <limits>
#include "polygon.hpp"
#include "commands.hpp"
int main(int argc, char * argv[]) {
using namespace baranov;
if (argc < 2)
... | TOOL | 0.871398 | 5.00289 |
980b5d17-1a11-4ffe-8ded-b987b58bd7d5 | Macw07/Macw07 | Algorithm/Depth-First-Search/P1657选书.cpp | #include <iostream>
using namespace std;
int x;
int w1[25], w2[25]; // 记录一个同学的两个志愿,只需要满足一个就行了
bool vis[25]; // 这本书是否被拿走了
int total=0; // 所有可行的结果
void dfs(int n){ // n->当前递归到的层数
// 递归的结束操作
if (n == x+1){
total++;
return;
}
// 继续递归下去
for(int i=1; i<=x; i++){ // 选择每一本书
if... | ALGO | 0.999967 | 3.797677 |
32ae999c-aba1-41a6-8278-2f3c0f70a07c | ishandutta2007/codeforces | abdude824/normal/433/B.cpp | #include<bits/stdc++.h>
#include<algorithm>
using namespace std;
#define fi(n) for(int i=0;i<n;i++)
#define fr(n) for(int i=n-1;i>=0;i--)
#define vi vector<int>
#define vs vector<string>
#define int long long int
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define setbits(x) __builtin_popcountll(x)
#def... | ALGO | 0.999927 | 4.114784 |
5731b5f6-7867-4d97-a414-8cf5f4983da9 | SuyeonShinnnn/BaekJoon | 30676.cpp | #include <iostream>
using namespace std;
int main()
{
int nm;
cin >> nm;
string color;
if(nm >= 620 && nm <= 780)
color = "Red";
else if(nm >= 590 && nm < 620)
color = "Orange";
else if(nm >= 570 && nm < 590)
color = "Yellow";
else if(nm >= 495 && nm < 570)
... | ALGO | 0.951856 | 4.476616 |
30476ce3-25ee-41c2-a1b8-523511298313 | yashi-garg/DSA | codeforces/codeforces_1426A.cpp | //codeforces1426A
#include<iostream>
using namespace std;
int main()
{
int t;
cin >> t;
while(t-->0)
{
int n,x;
cin >> n >> x;
int c=2;
int ans=1;
while(c<n)
{
c=c+x;
ans++;
}
cout << ans << endl;
}
} | ALGO | 0.999802 | 3.354552 |
f51610f0-aa9a-4933-befa-2f3d9463241e | vitorguidi/Competitive-Programming | Treinos equipe/xv de piracikobus/2019/01-18 Subcoxa 2013/h.cpp | #include "bits/stdc++.h"
using namespace std;
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define fr(i,n) for(int i=0;i<n;i++)
#define frr(i,n) for(int i=1;i<=n;i++)
#define ms(x,i) memset(x,i,sizeof(x))
#define dbg(x) cout << #x << " = " << x << endl
#define all(x) x.begin(),x.en... | ALGO | 0.999952 | 3.368262 |
46ab53eb-0410-47aa-854e-e401ac99fd11 | UjjwalSharma07/LeetCodes | A difference of values and indexes - GFG/a-difference-of-values-and-indexes.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
int maxDistance(int arr[], int n)
{
int ans = INT_MIN;
int mx = INT_MIN;
int mn = INT_MAX;
for(int i=0;i<n;i++) {
mx = max(mx,arr[i]-i);
... | ALGO | 0.999372 | 5.948056 |
03f9718a-f01a-4c84-9797-c3f94854a489 | elvin-hwang/Tile-Island | ext/opencv/sources/modules/dnn/src/layers/concat_layer.cpp | #include "../precomp.hpp"
#include "layers_common.hpp"
#include "../op_cuda.hpp"
#include "../op_halide.hpp"
#include "../op_inf_engine.hpp"
#include "../ie_ngraph.hpp"
#include "../op_vkcom.hpp"
#ifdef HAVE_OPENCL
#include "opencl_kernels_dnn.hpp"
#endif
#ifdef HAVE_CUDA
#include "../cuda4dnn/primitives/concat.hpp"
... | ALGO | 0.904534 | 7.129812 |
d99f560c-a516-46ea-82a5-9633f1d7fd9d | mogoweb/webkit_for_android5.1 | skia_old/tools/skdiff.cpp | #include "skdiff.h"
#include "SkBitmap.h"
#include "SkColor.h"
#include "SkColorPriv.h"
#include "SkTypes.h"
/*static*/ char const * const DiffRecord::ResultNames[DiffRecord::kResultCount] = {
"EqualBits",
"EqualPixels",
"DifferentPixels",
"DifferentSizes",
"CouldNotCompare",
"Unknown",
};
Dif... | TOOL | 0.942822 | 7.084743 |
1c02ee67-ec92-4fca-9ccd-51f99a8f66ca | girishsontakke/DataStructure | recursion/simpleRecursion.cpp | #include <bits/stdc++.h>
using namespace std;
void print(int n)
{
if (n > 0)
{
print(n - 1); // head recursion
cout << n << endl;
}
return;
}
int main()
{
int i = 3;
print(3);
} | ALGO | 0.999948 | 4.007764 |
2ba3b956-ae2b-49dc-97b8-cd1439ac7871 | Wings-poo/Kattis-solutions | soundex_Amanda.cpp | /*
*OpenKattis
*soundex
*Code by: Amanda Lim
*/
#include <bits/stdc++.h>
using namespace std;
int main ()
{
int soundex[] = {0,1,2,3,0,1,2,0,0,2,2,4,5,5,0,1,2,6,2,3,0,1,0,2,0,2};
string word;
while (cin >> word) {
int prev_soundex = 0, curr_soundex = 0;
for (int i = 0; i < (int) word.size... | ALGO | 0.999756 | 4.92134 |
5fac84fc-a8c8-4ecf-9d7b-bcbabc42aecc | bartekjaszczak/rito | src/lcu_process_handler_helpers.cpp | #include "lcu_process_handler_helpers.h"
#include "exception.h"
#include <regex>
namespace rito {
auto extract_remoting_auth_token(const std::string& lcu_command) -> std::string
{
std::regex token_regex{"--remoting-auth-token=([a-zA-Z0-9-_]+)[^a-zA-Z0-9-_]"};
std::smatch token_match;
if (std::regex_searc... | TOOL | 0.928615 | 6.483171 |
3d45c3e2-7b41-482c-9ccd-9c5b6848a8fc | changsongzhu/leetcode | C++/category/array/059_m.cpp | /**
59[M]. Spiral Matrix II
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[ 7, 6, 5 ]
]
**/
class Solution {
public:
vector<vector<int>> generateMatrix(int n) {
... | ALGO | 0.999863 | 5.466375 |
9f6f74e5-552b-4728-af98-b277779dff73 | sabdelhay/embedded_linux_diploma | C++/SE_1/task3.cpp | #include <iostream>
int main(){
for(int i = 1; i<=5; i++){
for(int j = 0; j<i; j++){
std::cout << "*";
}
std::cout << std::endl;
}
return 0;
} | ALGO | 0.999311 | 3.615358 |
9247c8eb-9ae6-4bb2-9619-ca99636314fd | mtytel/HelmUnityPlugin | NativeCode/helm/JUCE/modules/juce_box2d/box2d/Dynamics/Joints/b2PrismaticJoint.cpp | #include "b2PrismaticJoint.h"
#include "../b2Body.h"
#include "../b2TimeStep.h"
// Linear constraint (point-to-line)
// d = p2 - p1 = x2 + r2 - x1 - r1
// C = dot(perp, d)
// Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1))
// = -dot(perp, v1) - dot(cross(d + r1, perp), w1) + do... | ALGO | 0.999344 | 7.753049 |
939c9d13-9e15-43d2-8072-55e3752255cf | approjecthub/CP_practice | graphs/wordLadder2.cpp | // https://practice.geeksforgeeks.org/problems/word-ladder-ii/1
void DFS(string node, string targetWord, int level,
unordered_set<string> &uset, vector<string> &path, vector<vector<string>> &ans)
{
if (level == 0 && node == targetWord)
{
ans.push_back(path);
return;
}
else if (... | ALGO | 0.99999 | 6.123575 |
d2b23e74-cea1-439a-ad05-b1c726b05d66 | il999/CompetitiveProgramming | codeforces/1626/C.cpp | #include <iostream>
using namespace std;
void solve()
{
int n;
cin>>n;
long long m[n];
long long h[n];
for(int i=0;i<n;i++)
{
cin>>m[i];
}
for(int i=0;i<n;i++)
{
cin>>h[i];
}
long long mana=0;;
long long temp_mana=h[0];
long long last=m[n-1];
long... | ALGO | 0.999963 | 3.287834 |
fa54aa71-5a2f-435b-8946-887bf9126d35 | shail10/6Companies30days | Goldman_Sachs/Day4/11_Find-missing_and_repeating.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
int *findTwoElement(int *arr, int n) {
int repeat = 0;
int miss = 0;
for(int i=0;i<n;i++)
{
int idx = abs(arr[i]) - 1;
if(arr[idx]>0){
... | ALGO | 0.999817 | 5.180682 |
504cc7bf-c143-4054-8671-0ec6c8595a7c | stackwild/gogogadget | leetcodes/810. Chalkboard XOR Game/810.cpp | class Solution {
public:
bool xorGame(vector<int>& nums) {
const int xors = accumulate(nums.begin(), nums.end(), 0, bit_xor<int>());
return xors == 0 || nums.size() % 2 == 0;
}
};
| ALGO | 0.999817 | 6.022625 |
9af94f4e-c9ba-4934-9257-c8341eb05e01 | stalker5217/problem-solving | BAEKJOON/3085.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n; cin >> n;
vector<vector<char> > arr(n, vector<char>(n, 0));
for(int i = 0 ; i < n ; i++) {
for(int j = 0 ; j < n ; j++) {
cin >> arr[i... | ALGO | 0.99994 | 4.046045 |
0add790a-2592-4cdd-bc7f-f3ada165b2d7 | omnirepo/frameworks_av | media/libstagefright/codecs/amrnb/common/src/residu.cpp | /*
Pathname: ./audio/gsm-amr/c/src/residu.c
------------------------------------------------------------------------------
REVISION HISTORY
Description: Updated template used to PV coding template. First attempt at
optimizing code.
Description: Deleted stores listed in the Local Stores Needed/Modified... | ALGO | 0.999934 | 3.810766 |
35f26c84-2c0a-407b-82da-6b5722ca8ed2 | saireddyavs/Coding-Practice | 977. Squares of a Sorted Array/answer.cpp | class Solution {
public:
vector<int> sortedSquares(vector<int>& nums) {
int size=nums.size();
vector<int> result(nums.size());
int start=0;
int end=size-1;
int position=end;
while(start<=end){
if(abs(nums[start])<abs(nums[end])){
result[pos... | ALGO | 0.999984 | 5.938424 |
ece8f142-49e0-4e43-8e90-e7dd69f3af93 | TheViking733n/CodeForces-Python-Solutions | Contests/Codeforces Round #820 (Div. 3)/A_Two_Elevators.cpp | #pragma region
#pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
// #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/trie_policy.hpp>
using namespace std;
// using namespace __gnu_pbds;
// ==================================... | ALGO | 0.999962 | 4.983587 |
68144eff-7547-4eae-8688-59d4101e3ed3 | shumbul/Post-Grad-Coding | Graph/15. BFS - Detect directed cycle - Course Schedule.cpp | // https://leetcode.com/problems/course-schedule/
// Topological Sort using BFS: Detecting cycle in directed graph using BFS
class Solution {
public:
bool canFinish(int n, vector<vector<int>>& prerequisite) {
int np=prerequisite.size();
// create a graph -> adj list
unordered_map<int, vect... | ALGO | 0.999961 | 7.20038 |
56aaa151-9e2a-497e-941d-d6277612d1e5 | jsarthak/LeetCode | average_of_levels.cpp | //
//Given the root of a binary tree, return the average value of the
//nodes on each level in the form of an array.
//Answers within 10-5 of the actual answer will be accepted.
#include <bits/stdc++.h>
using namespace std;
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode... | ALGO | 0.999864 | 6.592012 |
0fbe4927-c4dd-4304-ac62-36ab236f0ed3 | DanielAngelo2024/CPlusPlus-Exercises | ListaFilas/Ex1Circular/main.cpp | #include <iostream>
using namespace std;
/*
Fila Circular Armazm com 3 caixas
Enunciado: Um armazm tem 3 caixas para empacotar
produtos. Quando todas esto cheias e uma liberada, a
prxima caixa disponvel usada no formato circular.
Inserir 3 cdigos de produto, 3 caixas, ou seja fila circular tam 3
Liberar 1 caixa, ... | ALGO | 0.97257 | 4.329597 |
062f3c5e-2188-42fc-8cd6-25cb6bbf4b99 | Manuelacosta98/competitive-programing | spoj/BEENUMS.cpp | #include <iostream>
#include <cmath>
using namespace std;
int main()
{
while(1)
{
float a,b;
double k;
cin>>k;
if(k==-1) return 0;
else
a=(sqrt(1+4*((k-1)/3))-1)/2;
if(a-int(a)) cout<<"N"<<endl;
else cout<<"Y"<<endl;
}
return 0;
}
| ALGO | 0.999907 | 3.011332 |
10d27726-fbc0-4aa8-81db-e6deb2979e16 | plasmatic1/dmoj-solutions | cpp/ioi01p1.cpp | #include <bits/stdc++.h>
//#define DEBUG
//1024 + 1 for 1 based indexing
using namespace std;
typedef long long ll;
typedef pair<int, int> p;
const int MAX = 1025;
int n, input, buf, buf2, buf3, buf4, totaltree[MAX][MAX];
void addd(int x, int y, int z){
for(int cx = x; cx <= n; cx += cx & -cx){
for(int cy = y;... | ALGO | 0.986263 | 3.942417 |
3f4ea22d-47e2-46d1-9bfd-6b7e4395d782 | huseyinnatess/Internet-Relay-Chat | Commands/JOIN.cpp | #include "../Server/Server.hpp"
#include "../Channel/Channel.hpp"
#include <sstream> //-> for std::istringstream
void SplitChannelKeys(string channelKeys, vector<string>& keys)
{
if (channelKeys.empty() || channelKeys.size() == 1 || channelKeys[0] == '#'
|| channelKeys[0] == '&')
{
return;
... | WEB | 0.923508 | 4.857467 |
494c580f-9b85-4f9e-9da2-0792e3066232 | soolabettu/cp | gks/2019/practice/energy_stones_mahmoudian.cpp | // In the name of God
#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
#incl... | ALGO | 0.999674 | 3.162634 |
0f941146-614f-4e0c-a06e-86be00dd69a6 | ssj-gz/Competitive-Programming | adventofcode/2024/day14/generate-from-text.cpp | #include <iostream>
#include <vector>
#include <cassert>
using namespace std;
int mod(int x, int modulus)
{
while (x < 0)
x += modulus;
return x % modulus;
};
int main()
{
vector<string> image;
constexpr auto width = 101;
constexpr auto height = 103;
string imageRow;
while (getli... | ALGO | 0.998203 | 4.10773 |
e2116ecb-5d2d-4861-84af-c310fb6c352a | absuii/Competitive-Programming | practice/maxsubsum.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n; cin>>n;
vector<int> numbers(n+1);
for(int i=0; i<n; i++){
int a; cin>>a;
numbers[i+1] = numbers[i] + a;
}
/*int ans = INT_MIN;
for(int i=1; i<n+1; i++){
for(int j = 1; j<=i; j++){
int sum = number... | ALGO | 0.999972 | 3.845148 |
bbf4c89c-38ef-4b7e-ab0e-f15f5efdf436 | NPIPHI/CubeGame | common/tangentspace.cpp | #include <vector>
#include <glm/glm.hpp>
#include "tangentspace.hpp"
void computeTangentBasis(
// inputs
std::vector<glm::vec3> & vertices,
std::vector<glm::vec2> & uvs,
std::vector<glm::vec3> & normals,
// outputs
std::vector<glm::vec3> & tangents,
std::vector<glm::vec3> & bitangents
){
for (unsigned int i=... | ALGO | 0.997846 | 7.56178 |
07d102bc-ba78-40cf-b6af-240f7cebccab | Yestercafe/oj | codeforces/Codeforces Round #853/a.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
#define N 300050
void solve() {
int n;
std::cin >> n;
std::vector<int> v(n);
for (int i = 0; i < n; ++i) {
std::cin >> v[i];
}
int ai, bi, min_gcd = INT_MAX;
for ... | ALGO | 0.999979 | 4.408673 |
3ba98033-694b-4980-9ce7-0cd793a69dfd | MikaParssinen/MachineLearningLab | MachineLearningLab/eigen-3.4.0/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.999269 | 5.538595 |
4b75c6f0-814c-44b4-80ba-3753339cb9eb | vanitas-23/Daily_progress | 576-out-of-boundary-paths/out-of-boundary-paths.cpp | class Solution {
public:
int dp[51][51][51];
int mod=1e9+7;
int f(int m, int n, int maxMove,int i,int j,int* dr,int* dc){
if(i<0 || i>=m || j<0 || j>=n)
return 1;
if(!maxMove)
return 0;
if(dp[i][j][maxMove]!=-1)
return dp[i][j][maxMove];
long ans=0;
... | ALGO | 0.999944 | 5.769859 |
a0d77ed3-e224-431b-b448-c463c99e0701 | pratyushp21/Atcoder | atcoder#101/a.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define MAX 1e9+7
#define MIN -1e9-7
#define mem memset(a, 0, sizeof(a))
#define pb push_back
void solve()
{
string s;
cin>>s;
int ans=0;
for(int i=0;i<s.size();i++)
{
if(s[i]=='+')ans++;
else ans--;
}
cout<<ans<<endl;
}... | ALGO | 0.999931 | 4.373728 |
5a56a021-211d-4ffd-ab8b-a4aaba3e78c3 | bbbbhrrrr/PQ-secure_FHE_ML_PDTE_FiLIP | gold/install_scripts/ntl_install/src/GF2XTest.cpp |
#include <NTL/GF2X.h>
NTL_CLIENT
struct wd {
int amt;
wd(int x) { amt = x; }
};
#define WD(x,y) wd(x) << (y)
ostream& operator<<(ostream& s, const wd& w)
{
s.width(w.amt);
return s;
}
int main()
{
long n;
GF2X a, b, c, c1, ss, ss1, tt, tt1;
double t;
long iter, i;
cout << WD(12,"n")... | TEST | 0.95944 | 4.160874 |
5bdeb831-0ba3-4f8f-807e-613241d22841 | ishandutta2007/codeforces | danya.smelskiy/normal/961/C.cpp | #include <bits/stdc++.h>
using namespace std;
int n;
int dp[5][2];
int ans=1e9;
int main() {
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
cin>>n;
for (int k=1;k<=4;++k) {
int c1=0,c2=0;
for (int i=1;i<=n;++i) {
string s;
cin>>s;
s="#"+s;
... | ALGO | 0.999886 | 3.860535 |
c0940901-0ff0-4b41-93b4-73b432cb4c04 | uniqucoder/DSA | Linked_list/middleofLL.cpp | #include<bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node* next;
Node(int d)
{
this->data = d;
this->next = NULL;
}
};
void traverse(Node* &head)
{
Node* temp = head;
while(temp != NULL)
{
cout<<temp ->data<<" ";
temp = tem... | ALGO | 0.999791 | 4.446055 |
39a85cf2-d40d-41ec-bdfe-8f862cc3f27b | joelb92/ND_Frontalization_Project | Release/Frontalization_Code_Matlab/frontalization_demo_v1/mexopencv-2.4/src/+cv/drawContours.cpp | /**
* @file drawContours.cpp
* @brief mex interface for drawContours
* @author Kota Yamaguchi
* @date 2011
*/
#include "mexopencv.hpp"
using namespace std;
using namespace cv;
/**
* Main entry called from Matlab
* @param nlhs number of left-hand-side arguments
* @param plhs pointers to mxArrays in the left-han... | ALGO | 0.941061 | 5.93135 |
05c31988-c212-4025-b232-d1f71d9ba83e | TasnimZia/IUB-CodingDojo | prac2.cpp | //C++ program to convert specified days into years, weeks and days.
#include <iostream>
using namespace std;
int main()
{
int years, weeks, days, remaining_days;
cout<<"Enter the number of days: "<<endl;
cin>>days;
years=days/365;
weeks=(days%365)/7;
remaining_days=days-((years*365)+(we... | ALGO | 0.994899 | 3.242236 |
1df45a0a-ed78-461f-baa1-4ec2faed1bea | Sudhir-yadav1999/Linked_List | Remove_duplicates_sorted.cpp |
------------------------------------------------
Remove duplicate element from sorted Linked List
------------------------------------------------
void removeDuplicates(struct Node* head)
{
struct Node *temp=head;
struct Node *nex=head;
while(temp!=NULL)
{
if(temp->data == temp->next->dat... | ALGO | 0.99986 | 3.884777 |
ad713e59-e25f-4890-b6de-4e90eab5082d | Hussamalibrahim/First-Year-CPP-Programming-Projects | Basics/Function/functionContinue.cpp | #include<iostream>
using namespace std;
int xy (int, int);
int fx (int, int );
int fx (int x, int y){
return x + y;
}
int main ()
{
cout << xy (5, 4) << endl;
cout << fx (4, 4) << endl;
cout << y (5, 4) << endl;
return 0;
}
intxy (int x, int y){
return x * y;
}
| ALGO | 0.992877 | 4.01618 |
afb101b8-9acc-4143-b093-a947890a0797 | vineet1202/Cpp | STL/Set.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
//sorted and uniuqe elements
set<int> s;
s.insert(2);
s.insert(3);
s.insert(4);
s.insert(5);
//operations - take O(logn) time
// find() - returns an iterator if found else returns end()
auto it = s.find(4);
s.erase(5... | ALGO | 0.979566 | 4.566268 |
2f02dec7-28f2-4e55-8c47-2278980c2540 | devyaniChoubey/My-Solutions-DS-Algo | Graphs/DFS/Coloring A Border.cpp | https://leetcode.com/problems/coloring-a-border/description/
https://leetcode.com/problems/coloring-a-border/solutions/282847/c-with-picture-dfs/
class Solution {
public:
void dfs(int row, int col, int cl ,vector<vector<int>>& grid,vector<vector<int>>& vis){
int n = grid.size();
int m = grid[0].si... | ALGO | 0.999702 | 6.583229 |
a109695d-5e63-4e79-a524-67cdccd83c55 | bhrnjica/magma | sparse/src/ztfqmr.cpp | /*
-- MAGMA (version 2.4.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date June 2018
@author Hartwig Anzt
@precisions normal z -> s d c
*/
#include "magmasparse_internal.h"
#define RTOLERANCE lapackf77_dlamch( "E" )
#d... | ALGO | 0.998647 | 6.390041 |
79e33147-b4fd-42ec-87be-13554cf59623 | beelisais2793/FX | Synthesizer/Waves/Noise/Noises/noise/BlueNoise/src/Library/Math.cpp | /*
Math.cpp
Li-Yi Wei
07/15/2007
*/
#include <math.h>
#include "Math.hpp"
double Math::PI = 3.14159265;
float Math::MaxPackingDensity(const int dimension)
{
float packing_density = -1;
// from http://mathworld.wolfram.com/HyperspherePacking.html
switch(dimension)
{
case 2:
... | ALGO | 0.999726 | 5.970257 |
fb8f978f-eed3-4de5-8d01-0ba883af99fa | Visiator/Visiator_Windows | V26/cryptopp/shark.cpp | // shark.cpp - originally written and placed in the public domain by Wei Dai
#include "pch.h"
#include "shark.h"
#include "misc.h"
#include "modes.h"
#include "gf256.h"
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
# pragma GCC diagnostic ignored "-Wmissing-braces"
#endif
NAMESPACE_BEGIN(CryptoPP)
static word64 SHARKTransf... | ALGO | 0.999235 | 7.766914 |
7d3a3880-a41d-45c3-97c3-e41566e8148b | liuq901/code | LOJ/l_1332.cpp | #include <cstdio>
#include <cstring>
const int n=36;
int pos[n][2];
unsigned one[n][n];
bool ok(int x,int y)
{
return(x!=y && x+1!=y && x-1!=y);
}
bool check(int x,int y)
{
for (int i=0;i<2;i++)
for (int j=0;j<2;j++)
if (!ok(pos[x][i],pos[y][j]))
return(false);
return(tru... | ALGO | 0.999476 | 4.298698 |
cf12ec27-e23c-4851-a006-39461a6ac25f | DhruvaMenon/LLM-Chatbot | Program's_Contributed_By_Contributors/C++ Programs/Stacks/Reversing_the_String.cpp | #include <iostream>
#include <stack>
#include <string>
using namespace std;
string reverseString(string inputString) {
stack<char> charStack; // Create a stack of characters
string reversedString = "";
// Push each character of the input string onto the stack
for (char c : inputString) {
char... | ALGO | 0.998442 | 6.769931 |
1014eed4-d05b-4679-b21f-d1f91743950b | siddharthshenoy/LEET | ransom-note/ransom-note.cpp | class Solution {
public:
bool canConstruct(string ransomNote, string magazine) {
unordered_map<char,int> m;
for(int i = 0; i < magazine.size(); i++)
m[magazine[i]]++;
for(auto x : ransomNote){
if(m[x] > 0)
m[x]--;
else
return fa... | ALGO | 0.999916 | 6.243911 |
5127492e-ad21-478d-a66b-fa9c0a415c4a | ritik955/Leetcode_Solutions | 1252-cells-with-odd-values-in-a-matrix/1252-cells-with-odd-values-in-a-matrix.cpp | class Solution {
public:
int oddCells(int n, int m, vector<vector<int>>& indices) {
int ans = 0;
vector<int> rows(n);
vector<int> cols(m);
for (vector<int>& indice : indices) {
rows[indice[0]] ^= 1;
cols[indice[1]] ^= 1;
}
for (int i = 0; i < n; ++i)
for (int j = 0; j < m;... | ALGO | 0.99999 | 6.456865 |
63a2327f-9d0e-4756-bbe9-994191e3d5c4 | AdRo07/frameworks_av | media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp | /*
------------------------------------------------------------------------------
Pathname: ./audio/gsm-amr/c/src/autocorr.c
Date: 05/15/2000
------------------------------------------------------------------------------
REVISION HISTORY
Description: Put into template...starting optimization.
Description:... | ALGO | 0.999621 | 3.171741 |
6b561613-47e1-4cb4-8ff0-64097232a064 | NguyenBui256/PTIT | DSA/DSA02007 - ĐỔI CHỖ CÁC CHỮ SỐ.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,a,b) for(int i = a; i < b; i++)
#define FORD(i,a,b) for(int i = a; i > b; i--)
#define fi first
#define se second
#define pb push_back
int n, k, final = 0;
int a[15][15], b[15][15];
void solve()
{
cin >> k;
string s; cin >> s;
... | ALGO | 0.999989 | 4.527613 |
d671117f-8777-48c3-bf3d-da61b4e1c911 | facebookarchive/BOLT | libcxx/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp | // <random>
// template<class RealType = double>
// class piecewise_constant_distribution
// template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
#include <random>
#include <algorithm>
#include <vector>
#include <iterator>
#include <numeric>
#include <cassert>
#include <cstddef>
#include ... | TEST | 0.923371 | 5.410498 |
a483e974-c0c8-480b-8eb6-af2e603a4141 | manikanta2901/ubuntu | .history/SRM/DAA/Algorithms/Backtracking/SubsetSum_20210524120533.cpp | #include<bits/stdc++.h>
using namespace std;
void PrintSubSet(vector<int> result){
cout << "Total number of subsets are " << result.size() << " -----> " << endl;
for(auto i : result){
cout << i << " ";
}
cout << endl;
}
void subset_sum(vector<int> temp,vector<int> result,int temp_size,int re... | ALGO | 0.99959 | 4.287749 |
6c3f2fc4-c922-41da-aa46-80da019312ae | srishtiraut/dsa | Babbar sheet/identify-bipartiteness.cpp | class Solution {
public:
bool isBipartite(int V, vector<vector<int>> &edges) {
// Code here
queue<int> q;
q.push(0);
int color[V];
for(int i=0; i<V; i++) color[i] = -1;
color[0] = 0;
while(!q.empty()){
int node = q.front();
q.pop();... | ALGO | 0.99976 | 6.090606 |
7aa0f873-6779-4f13-85b9-f1a7f97d7b6f | Shubham-Raj-25/LeetCode-Solutions | 0113-path-sum-ii/0113-path-sum-ii.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.999963 | 6.148523 |
a457cf79-eb80-4b58-81ba-0ca0f0d9f3e4 | wind9051/LeetCode | Problems/Cpp/1295. Find Numbers with Even Number of Digits.cpp | class Solution {
public:
int findNumbers(vector<int>& nums) {
int cnt = 0;
for (int i = 0; i < nums.size(); i++) {
if (to_string(nums[i]).size() % 2 == 0) cnt++;
}
return cnt;
}
};
| ALGO | 0.998587 | 5.905325 |
a2164abc-e503-4bcf-ae6d-0111baad4eed | KhushiBhambri/Leetcode-Solutions | 692. Top K Frequent Words.cpp | //problem : 692. Top K Frequent Words
// Given a non-empty list of words, return the k most frequent elements.
// Your answer should be sorted by frequency from highest to lowest. If two words have the same frequency, then the word with the lower alphabetical order comes first.
// Example 1:
// Input: ["i", "love", ... | ALGO | 0.99999 | 5.992729 |
07022ce3-9eb8-4add-baa7-35da086dd03d | kevinosor/FUVI | Cuerpos Geometricos C++/Ejercicio_TroncoCono.cpp |
#include<iostream>
#include<cmath>
using namespace std;
int main() {
float arealateral, areamayor, areamenor, areatotal;
float g, h, r;
float rmayor, volumen;
int x;
cout << "Este algoritmo fue creado para saber cual es el area lateral, area total y el volumen de un tronco de cono" << endl;
cout << "---------... | ALGO | 0.978396 | 3.425172 |
8c164c66-4169-476b-a81c-7dfd8f0395b5 | Brit-Coin/britcoin | src/qt/transactionfilterproxy.cpp | #include "transactionfilterproxy.h"
#include "transactiontablemodel.h"
#include "transactionrecord.h"
#include <QDateTime>
#include <cstdlib>
// Earliest date that can be represented (far in the past)
const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0);
// Last date that can be represented (... | TOOL | 0.855786 | 6.668473 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.