uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
2cc1104b-673a-4e6d-9b93-98261ad25c31 | SabrinaSioli/ComputerGraphics1-Project | Teste_OPENGL/eigen-3.4.0/doc/snippets/MatrixBase_all.cpp | Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones());
Vector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs();
// let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax:
cout << "Is (" << p0.transpose() << ") inside the box: "
<< ((boxMin.array()<p0.array(... | ALGO | 0.982673 | 3.495238 |
bf6daffc-05bf-45ae-abba-134f2e588d66 | Kaileshwaran13/CodeChef | 1400 - 1600 difficulty rating/Confusing Concatenations.cpp | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
int32_t main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector < int > v(n);
for (int i = 0; i < n; i++)
cin >> v[i];
int i;
for (i = 1; i < n; i++) {
if (v[i... | ALGO | 0.999531 | 3.643726 |
baa3b689-f26e-49d8-a23b-640e03b0a2f1 | solomonwzs/document2text | msoffice/ms_xls/crypt/rtl/cipher.cpp | #include "msoffice/ms_xls/crypt/rtl/cipher.h"
#include <memory>
CipherARCFOUR::CipherARCFOUR() : m_direction(rtl_Cipher_DirectionInvalid) {}
CipherARCFOUR::rtlCipherError CipherARCFOUR::Init(
CipherARCFOUR::rtlCipherDirection Direction, const unsigned char *pKeyData,
const size_t nKeyLen, const unsigned char... | ALGO | 0.986151 | 6.599929 |
eaa5ebe1-61ed-41b1-848f-adacf55f6609 | pavankumar130/LeetCode | 2727-number-of-senior-citizens/number-of-senior-citizens.cpp | class Solution {
public:
int countSeniors(vector<string>& details) {
int n = details.size();
int cnt = 0;
for(int i = 0; i < n; i++){
string s = details[i].substr(11, 2);
int num = stoi(s);
if(num > 60){
cnt++;
}
}
... | ALGO | 0.998421 | 6.052221 |
80a9d99a-aa51-4eb4-8dc6-1c0664b01248 | JassonCordones/Hacker.Rank.Problems.Solutions | artificial_intelligence/bot_building/botclean_stochastic.cpp | #include<iostream>
#include<vector>
using namespace std;
void nextMove(int posr, int posc, vector <string> board) {
//add logic here
vector <string> v;
int di,dj;
int n = board.size();
for(int i=0; i<n; ++i)
{
for(int j=0;j<n; ++j)
{
v.push_back(board[i].substr(j,1))... | ALGO | 0.999578 | 4.707103 |
d0fb5003-25b6-4de3-ad49-c97e04211458 | Jiwan/RADS | thirdparty/boost/libs/graph/example/bfs.cpp | #include <boost/config.hpp>
#include <algorithm>
#include <vector>
#include <utility>
#include <iostream>
#include <boost/graph/visitors.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/breadth_first_search.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/graph/graph_utility.hpp... | ALGO | 0.999765 | 6.792678 |
2e7862f7-5a9f-466f-ba1a-ef037cdd3e9f | Vesion/Misirlou | hihocode/1043-CompleteKnapsack.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
using namespace std;
int N, W;
int dp[100005];
int w[505], v[505];
int main() {
cin >> N >> W;
for (int i = 0; i < N; ++i) cin >> w[i] >> v[i];
memset(dp, 0, sizeof dp);
for (int i = 0; i < N; ++i) {
... | ALGO | 0.999983 | 4.704532 |
7e2e9ab8-4a3e-4a07-bda4-607a48a516a1 | ezterry/GB-external_webkit | WebCore/rendering/break_lines.cpp | #include "config.h"
#include "break_lines.h"
#include "CharacterNames.h"
#include "TextBreakIterator.h"
#if PLATFORM(MAC)
#include <CoreServices/CoreServices.h>
#endif
namespace WebCore {
static inline bool isBreakableSpace(UChar ch, bool treatNoBreakSpaceAsBreak)
{
switch (ch) {
case ' ':
case ... | TOOL | 0.939363 | 5.671932 |
85d2f96c-5316-4089-9450-4706e5dc7012 | huangminzhe/Program-Files | Luogu/P3384.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 5,INF = 0x7fffffff;
int mod;
template<typename tp>
class SGT{
private:
vector<tp> a,d,b;
int n;
inline void up(int p){d[p] = (d[p * 2] + d[p * 2 + 1]) % mod;}
void pd(int l,int r,int p){
size_t mid = l + (r - l >> 1);
... | ALGO | 0.999979 | 4.378394 |
b73325f4-884b-4031-abbf-6182ea620d0b | Dhomochevsk/evidenciaCursoC- | unit3/unit3_7.cpp | #include <iostream>
#include <cmath>
using namespace std;
// specimen #1 - for int variables
void increment(int &var, int inc = 1) {
var += inc;
}
// specimen #2 - for float variables
void increment(float &var, double inc = 1.0) {
var += inc;
}
int main(void) {
int intvar = 0;
float floatvar = 1.5;
for(int i... | ALGO | 0.979 | 3.668069 |
6080646c-c721-4f36-988b-c4609f7eff6d | losyoply/Competitive-Programming-Training-HW | atcoder1209-2.cpp | #include <iostream>
#include <vector>
using namespace std;
long long minSplits(const vector<int>& A, int S) {
long long count = 0;
int sum = 0;
for (int i = 0; i < A.size(); ++i) {
if (sum + A[i] > S) {
count++;
sum = 0;
}
sum += A[i];
}
return count ... | ALGO | 0.999898 | 5.24868 |
6f757764-493d-4f16-a0b6-43a34ed31011 | aritra741/Competitive-Programming | LightOJ/Square.cpp | #include <>bits/stdc++.h
using namesapce std;
int dp[(1<<20)+5];
bool vis[(1<<20)+5];
int done, n;
int arr[25];
int rec( int mask, int tot )
{
if(mask==done)
return 0;
if(vis[mask])
return dp[mask];
}
int main()
{
}
| ALGO | 0.997952 | 3.067344 |
4e05e240-b3af-4477-a95d-d52c3a33b551 | bhavyawig/Competitive-Programming | B_The_Middle_Day.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main()
{
lli m;
cin>>m;
vector<lli> days(m);
lli sum=0;
vector<lli> pre(m);
for(lli i=0;i<m;i++)
{
lli a; cin>>a;
days[i]=a;
sum+=a;
}
pre[0]=days[0];
for(lli i=1;i<m;i++)
pre[i]=pre[i-1]+days[i];
//cout<<su... | ALGO | 0.999996 | 3.429116 |
60e2784f-8f00-47b0-a3e9-d0fcfc297a73 | cargilgar/Smart-Alarm-using-tinyML | src/arduino/test_smart_alarm/output_handler.cpp | #include "output_handler.h"
uint8_t recognizeLabel(int8_t* arr, bool msgVerbose) {
int8_t maxIndex;
int8_t maxValue = -128;
for (int8_t i = 0; i < kLabelCount; i++) {
int8_t temp = *(arr+i);
if (temp > maxValue) {
maxIndex = i;
maxValue = temp;
}
}
... | ALGO | 0.980596 | 4.509624 |
f4bca302-0db2-409e-ae1a-c537af4cde45 | anandshivam44/competetive-programming | XOR_Sum.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
const ll mod = 1000000007;
const ll inf = 1e18;
#define FIO \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define all(x)... | ALGO | 0.999851 | 3.878474 |
015c0fd0-8edd-4f34-9d37-d2bf739f895f | butter76/chessbench | engine/src/tools/print_lks_node.cpp | #include "chess.hpp"
#include "search/lks_search.hpp"
#include "time/fixed_time.hpp"
#include "options.hpp"
#include <iostream>
#include <sstream>
#include <string>
int main(int argc, char** argv) {
if (argc < 2) {
std::cerr << "Usage: print_lks_node <FEN...>\n";
std::cerr << "Example: print_lks_n... | TOOL | 0.890231 | 6.349816 |
eaae3f35-20b3-448b-86f2-2b204c38bc66 | raincross7/code-similarity | codes/train_code/problem108/problem108_389.cpp | #include<bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define sync ios_base::sync_with_stdio(false); cin.tie(NULL)
#define input(arr,n) for(ll i1=0;i1<n;i1++ )cin>>arr[i1]
#define mod 1000000007
#define F first
#define S second
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_po... | ALGO | 0.999995 | 4.250799 |
4b3fb803-57ad-41c5-bad3-4afcff68319b | drmeister/legacy-externals-clasp | boost/libs/spirit/example/qi/key_value_sequence_empty_value.cpp | // The purpose of this example is to show how to parse arbitrary key/value
// pairs delimited by some separator into a std::vector. The difference to
// the example 'key_value_sequence.cpp' is that we preserve the order of the
// elements in the parsed sequence as well as possibly existing duplicates.
// In addition ... | TOOL | 0.954832 | 6.348033 |
882034cd-c805-4467-a24e-53f27d028ee9 | ruby-kim/Algorithm | Baekjoon(BOJ)/2000~2999/2504.cpp | #include <iostream>
#include <stack>
#include <string>
#include <cmath>
using namespace std;
string input;
stack<char> s;
int main(void)
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> input;
long long result = 0;
int temp = 1;
bool impossible = false;
for (int i ... | ALGO | 0.999732 | 4.506786 |
aa1909d7-4ed8-466d-86fe-0d60e0fbffb6 | gautamsbh/cpp-algo-ds-programs | basics/generics/bubbleSortTemplate.cpp | #include <iostream>
#include <vector>
using namespace std;
/**
* Swap two elements
* @tparam T
* @param a
* @param b
*/
template<typename T>
void swapTemplate(T* a, T* b) {
T temp;
temp = *a; *a = *b; *b = temp;
}
/**
* Sort the array using bubble sort algorithm and return
* @tparam T
*/
template<typ... | ALGO | 0.999616 | 5.641955 |
4d818b87-9a1a-41f3-bf9b-25860682e37b | tanjil-islam/Introduction-to-C-Plus-Plus | Class Problem solve/Final term/13-11-2021/Md_Tanjirul_Islam_21-45532-3_B3/Store_n_elements_Array_and_print_using_pointer.cpp | #include <iostream>
using namespace std;
int main()
{
cout<<"Enter a number for input array: ";
int n,i;
cin>>n;
int arr[n];
int *x;
cout<<"Enter "<<n<<" number: ";
for( i=0; i<n; i++)
{
cin>>arr[i];
}
x=&arr[0];
for( i=0; i<n; i++)
{
cout<<"Your num... | ALGO | 0.952754 | 3.012336 |
b2ede46c-4d8f-4238-99f7-762dccd6d6b9 | gauravbaghel09/love-babbar | Recursion/basic.cpp | #include <iostream>
using namespace std;
int main()
{
int n = 0647; // if any numeric constant that begin with '0' followed immediately by one or more
// decimal digits,will be interpreted as octal.
cout << n; // 423
}
// 0647 -> 6*8^2 + 4*8^1 + 7*8^0 = 423; | TOOL | 0.915734 | 4.200892 |
85db6b12-c273-4b05-a0cf-47c2e509f582 | ishandutta2007/codeforces | roundgod/normal/1034/A.cpp | /*************************************************************************
> File Name: A.cpp
> Author: Roundgod
> Mail: <EMAIL>
> Created Time: 2018-09-26 01:21:19
************************************************************************/
#pragma GCC optimize(3)
#include<bits/stdc++.h>
#define MAXN 3... | ALGO | 0.99999 | 3.677515 |
f77b1d95-b2e8-45d6-900f-993df9c4e739 | ojusvini/DAA-Codes | misc/lab2/old/quick_turbo_sort.cpp | #include <stdio.h>
#include <math.h>
void quick(int a[], int low, int up);
int partition(int a[], int low, int up);
int main() {
int n, i;
scanf("%d", &n);
int a[n];
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
quick(a, 0, n-1);
/*for (i = 0; i < n; i++) {
printf("%d\n", a[i]);
}*/
return 0;
}
... | ALGO | 0.999963 | 4.101952 |
ec2ec4b0-2737-420d-98e1-324e5438240e | vbonnici/grafe-sim | analysis/data/p02272/s787447797.cpp | #include <cstdio>
#include <algorithm>
#pragma warning(disable: 4996)
#define MAX_N 500000
using namespace std;
int N, C;
int v[MAX_N], dp[MAX_N + 7];
int main()
{
scanf("%d", &N);
dp[N] = 1;
for (int i = (N + 2) / 2; i > 1; i--)
{
dp[i] = dp[2 * i - 1] + 2 * dp[2 * i] + dp[2 * i + 1];
}
for (int i = 2... | ALGO | 0.999884 | 3.579993 |
ed39c7b9-9039-4d37-a011-79d829c4d73d | ramiro-menendez/AEDD | Guía 5/Arreglos unidimensionales/Arreglos 12.cpp | #include<iostream>
#define N 6
using namespace std;
void ordenar(int V[]);
bool Quini6(int, int [], int []);
//------------------------------
int main() {
int n;
int sorteo[N] = {02,40,25,10,06,34};
int boleta[N];
cout << "Ingrese el número de boleta: ";
cin >> n;
//ingreso de numeros del jugador
for (i... | ALGO | 0.972099 | 4.078127 |
8b753c81-2495-4b4a-9a48-97752ccae3dc | ngctnnnn/Competitive-Programming | Codeforces/100 - 1000/486A.cpp | #include <bits/stdc++.h>
#define loop(i, a, b, c) for(__typeof(a) i=(a), _b=(b), _c=(c); i<_b; i+=_c)
#define loopeach(i, a, b) for(__typeof(a) i = (a), _b=(b); i <_b;++i)
#define loopback(i,a,b,c) for(__typeof(a) i=(a),_b=(b), _c=(c); i>=_b; i-=_c)
#define pii pair<int, int>
#define pll pair<long long, long long>
#def... | ALGO | 0.999697 | 3.58309 |
d7fc6280-5f74-4e86-9455-466baa4d2052 | haomingchan0811/Leetcode | 199. Binary Tree Right Side View.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
// BFS: O(N)time & space, 24.09%, ok
vector<int> rightSideView(TreeNode* root) {
ve... | ALGO | 0.999971 | 6.271995 |
caacbc47-ce3f-4c42-9904-b007148dc755 | yp155136/codebook | basic/rope.cpp | #include <ext/rope>
using namespace __gnu_cxx;
rope<int> *p[N],*sz[N]; //use merge by size
int pp[N],szz[N];
int ret = p[ver]->at(x);
p[ver]->replace(x,ret);
p[0] = new rope<int>(pp,pp+n+1);
| ALGO | 0.999813 | 3.658564 |
4b62ace1-9cf9-4e5c-92dc-18e6df02489e | mikhail-404/spbau | HeapSortTemplates/src/main.cpp | #include <iostream>
#include <ctime>
#include "binary_heap.hpp"
int main(int argc, char *argv[])
{
BinaryHeap <int> heap;
std::cout << "Random heap: ";
for(int i = 10; i > 0; --i)
{
int random_value = std::rand() % 100;
std::cout << " " << random_value;
heap.insert(random_value)... | ALGO | 0.989993 | 4.931665 |
3dffd0a6-1140-41cb-9dfc-22e933cf4c21 | mikaelleRubia/projetos-residencia-tic18 | C/Residencia/semana03/aula09.08.cpp | #include <iostream>
using namespace std;
int main() {
int altura;
cout << "Digite a altura do padrao: ";
cin >> altura;
if (altura <= 0) {
cout << "A altura deve ser um número inteiro positivo." << endl;
return 1;
}
cout << "Padrao 1:" << endl;
for (int i = 1; i <= altur... | ALGO | 0.967077 | 4.304988 |
ddb715af-f5c9-478f-9579-91efae863c09 | nois0720/TIL | algorithm/baekjoon-algorithm/입출력/12-11720번.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
int count;
int total = 0;
string a;
cin >> count;
cin >> a;
for (int i = 0; i < count; i++) {
total += (a.at(i) - '0');
}
cout << total << endl;
return 0;
}
| ALGO | 0.999814 | 3.926708 |
2631f7c6-7410-4590-a01c-0ccd14254400 | Davo911/ORBSLAM2-Win64-Archaeonaut | Thirdparty/win/eigen/bench/sparse_lu.cpp |
// g++ -I.. sparse_lu.cpp -O3 -g0 -I /usr/include/superlu/ -lsuperlu -lgfortran -DSIZE=1000 -DDENSITY=.05 && ./a.out
#define EIGEN_SUPERLU_SUPPORT
#define EIGEN_UMFPACK_SUPPORT
#include <Eigen/Sparse>
#define NOGMM
#define NOMTL
#ifndef SIZE
#define SIZE 10
#endif
#ifndef DENSITY
#define DENSITY 0.01
#endif
#ifnd... | ALGO | 0.997181 | 4.197675 |
07baba68-588d-4989-971b-e46884f685e1 | mehak0108/Programming | Codeforces/50A.cpp | #include <bits/stdc++.h>
#define ONLINE_JUDGE freopen("input","r",stdin); freopen("output","w",stdout);
#define MAX 100001
#define ll long long
#define ld long double
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define all(a) (a).begin(),(a)... | ALGO | 0.999928 | 4.321781 |
09686eb0-941e-4612-ae85-06e612a68eb8 | whlqz9300/leetcode | LeetCode119_Word Search.cpp | class Solution {
public:
bool exist(vector<vector<char> > &board, string word) {
int row = board.size(), col;
if (row)
col = board[0].size();
else
return false;
bool isfound = false;
vector< vector<bool> > isvisited(row, vector<bool>(col, false));
fo... | ALGO | 0.999882 | 5.822643 |
d1e7d233-e38d-4b98-af09-84062478fd0b | Ankit0225/Leetcode-and-gfg-solution | Duplicate Elements - GFG/duplicate-elements.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
class Array
{
public:
template <class T>
static void input(vector<T> &A,int n)
{
for (int i = 0; i < n; i++)
{
scanf("%d ",&A[i]);
}
}
template <class T>
static void print(vector<T> &A)
... | ALGO | 0.999893 | 5.822303 |
1afabe51-c205-4f3d-9b7c-155a5ce34190 | shucshin/TimusOnlineJudge | Jobbery.cpp | // Strongly Connected Components (Kosaraju's Algorithm)
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
using vi = vector<ll>;
#define endl '\n'
#define pb push_back
#define rep(i,a,b) for(int i = a; i < b; i++)
#define all(a) (a).begin(), (a).end()
class SCC {
pri... | ALGO | 0.999967 | 4.492377 |
1680a0ef-e083-4277-9575-fa9259102811 | ishandutta2007/codeforces | tdpencil/normal/1472/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) x.begin(), x.end()
#define sumvt(x) accumulate(all(x), 0ll)
#define sumat(v, n) accumulate(v, v+n, 0ll)
#define vt vector
#define ar array
template<class t>
void read(t a) {
cin >> a;
}
template<class t>
void read(vt<t> &a) {
for(auto... | ALGO | 0.999889 | 4.22967 |
403ac09c-c36e-41a0-9c02-46623ed6aa0a | ManuelGMS/Tecnicas-algoritmicas-en-ingenieria-del-software-TAIS | Ejercicios/VORAZ/Los Broncos de Boston/main.cpp | /*
TAIS 10, Manuel Guerrero Moñús y Guillermo Delgado Yepes.
Calculo del coste de la funcion resolver:
* Coste total: O( n + 2 * n * log(n) ) = O( n * (1 + 2 * log(n)) )
* Coste de la ordenacion de los dos vectores: O( 2 * n * log( n ) )
* n: Número de elementos del vector.
* Coste del al... | ALGO | 0.999725 | 4.463618 |
3a2bd2f2-b885-49d1-a082-26904f636a83 | oranium/AlgoEng | answers/bruno_reinhold/CodingWarmUp2/min_solution.cpp | #include <atomic>
#include <iostream>
#include <mutex>
#include <omp.h>
using namespace std;
bool is_solution(int number) { // test if number solves the problem
for (volatile int i = 10000000; i--;) {} // mock computation
return number > 133 && number < 140;
}
int main() {
constexpr int biggest_possible_... | ALGO | 0.999984 | 5.643759 |
ed875e6f-805b-43cb-a321-7fb4ba6fbabd | crDroid11/android_frameworks_av | media/libeffects/testlibs/AudioCoefInterpolator.cpp | #include <string.h>
#include <cutils/compiler.h>
#include "AudioCoefInterpolator.h"
namespace android {
AudioCoefInterpolator::AudioCoefInterpolator(size_t nInDims,
const size_t inDims[],
size_t nOutDims,
... | ALGO | 0.947732 | 6.435341 |
c38d72e1-bbb3-462a-a6d0-69d4addbf538 | Exlsunshine/LeetcodeSolution | 114.cpp | #include <iostream>
using namespace std;
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
... | ALGO | 0.999981 | 5.59302 |
5bc9f031-b1ea-4113-adb0-28580c9d0fa5 | hannahchun/ProblemSolving_2023 | Leetcode/112.cpp | // https://leetcode.com/problems/path-sum/
// Solution 1
// C++
#include <iostream>
using namespace std;
//Definition for a binary tree node.
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), ... | ALGO | 0.999911 | 6.501091 |
b15ddb7a-d1c5-4ffd-8a77-2e058870ad7b | alexander-lacki/Survival-Hierarchical-Agglomerative-Clustering | s_hac/s_hac_modified_logrank.cpp | #include <vector>
#include <boost/math/distributions.hpp>
#include "fast_logrank.cpp"
std::pair<std::vector<double>, std::vector<char>> create_nn_survival_data(std::vector<double>& surv_t, std::vector<bool>& surv_e, int* neighbors, int n_neighbors, int inst_row){
double a_t;
bool a_e;
std::vector<double> ... | ALGO | 0.999775 | 6.336104 |
dc20cf28-2843-4e39-b70f-d2ce3288f9cd | Anir-Ln/Competitive-Programming-Problems | codeforces/CF376-D2-B.cpp | /*
Mohamed Lahyane (Anir_Ln)
2021-10-09
21:23:06
*/
#include <iostream>
//#include <complex>
#include <queue>
//#include <set>
//#include <unordered_set>
//#include <list>
//#include <chrono>
//#include <random>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <map>
//#include <unorder... | ALGO | 0.99995 | 4.015997 |
50ddeaa9-79da-49bf-88e4-979056e4edda | Sughandhan/Competitive-Programming | codeforces/1551/B2.cpp | // BATMAN WAS HERE
#include<bits\stdc++.h>
using namespace std;
#define inf 1000000007
#define pb push_back
#define fr(i,a,b) for(int i=a;i<b;++i)
#define frn(i,a,b) for(int i=a;i>=b;--i)
#define all(v) (v).begin(), (v).end()
#define tr(v, it) for(vector<long long int> ::iterator (it) = (v).begin(); it!= (v).end() ;... | ALGO | 0.999959 | 3.523533 |
6c35c28d-6bf2-4fac-aede-2717e8c0e8f6 | padilhafernanda/prog-review | productExceptSelf.cpp | #include <iostream>
using namespace std;
void productExceptSelf(int arr[], int N){
int productE[N];
int j=0, self,temp=1;
while (j<N){
self = arr[j];
for (int i=0; i<N;i++){
if(i==j||arr[i]==1) temp = temp;
else temp = temp*arr[i];
}
productE[j]... | ALGO | 0.999984 | 4.966868 |
24d99bf1-7d0a-47ac-bb30-59db04f4d07a | rsmnnit/Codes | contest/bribetr.cpp | /* Radheshyam Lodhi
<EMAIL>
CSE-MNNIT Allahabad */
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define sfi(i) scanf("%d",&i)
#define sfid(a,b) scanf("%d%d",&a,&b)
#define sfl(i) scanf("%lld",&i)
#define sfld(a,b) scanf("%lld%lld",&a,&b)
#define pfl(a) printf("%lld\n",a)
#define pfi(a) pri... | ALGO | 0.999101 | 3.493866 |
14f4488e-95c5-469a-a5c1-648a23eddce2 | JNArrazola/Leetcode_Files | 242_valid_anagram/main.cpp | #include <iostream>
#include <unordered_map>
using namespace std;
class Solution
{
public:
bool isAnagram(string s, string t)
{
unordered_map<char, int> letras;
for (const char &c : s)
{
letras[c]++;
}
for (const char &c : t)
{
letras[c]... | ALGO | 0.999842 | 5.795554 |
e4961b90-9ce2-480a-9306-e994beafff99 | aleshin4dev/AdaBoost | betta.cpp | #include "iostream"
#include "math.h"
double betta(double e){
return (e / (1 - e));
}
| ALGO | 0.984778 | 3.102344 |
51670cf4-e93f-4a2f-8e19-6c25c0c70f6c | bigfatbrowncat/nostalgia | glm/test/core/core_func_matrix.cpp | ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentatio... | TEST | 0.876887 | 6.528796 |
609624fc-b427-42cd-8a31-ab6f83c682d8 | Sartazz7/CSES-Problem-Set | Graph/GameRoutes.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,m;
vector<int> *v;
int mod=1000000007;
ll *ways;
ll dfs(int k){
if(ways[k]!=-1)return ways[k];
ways[k]=0;
for(int i=0; i<v[k].size(); i++){
ways[k]=(ways[k]+dfs(v[k][i]))%mod;
}
return ways[k];
}
int main(){
cin... | ALGO | 0.999977 | 4.311958 |
d52eef2c-6ae5-4326-b300-6c5af2d97895 | moberry13/Kalkulyator1 | kalkulyator/интегралы.cpp | // интегралы.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
using namespace std;
#include <math.h>
#include <cmath>
#include "integral.h"
bool GetYesOrNo10() {
string input;
while (true) {
cout << "\nХотите повторить? (yes/no): "... | ALGO | 0.961751 | 3.400094 |
bb614e24-ab66-471c-8c30-7de00100054a | shaukat01/MyDailyProblemSolved | factorialofanumberbyrecursion.cpp | #include<stdio.h>
int fact(int n)
{
if(n==0)
return 1 ;
else{
return fact(n-1)*n;
}
}
int main()
{
int r;
r = fact(4);
printf("%d", r);
return 0;
} | ALGO | 0.999982 | 4.159592 |
6486b1b0-035d-4e38-bcbf-f3beaeb1db1c | shyu61/program-competition | code/contest/abc386/d.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using TP = tuple<int, int, char>;
const int INF = 1001001001;
// ジャンル
// グリッド問題, 階段状領域問題
// 方針
// グリッド問題で判定系なのでsortして片方を固定して考える
// sortして順にスキャンするという時点で、逐次問題に変化していることに注意
// つまりスキャンしつつ動的に何らかしらの情報を保存し、それを使って判定することを考えると、
// Wのyの... | ALGO | 0.999988 | 5.01418 |
4f1e1144-b374-4eef-aeeb-cddff5a0773d | qiaozishun4/CSP2024_BJ | BJ-Junior/answers/BJ-J01653/poker/poker.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
freopen("pocker.in","r",stdin);
freopen("pocker.out","w",stdout);
int a,b;
string s;
cin>>a;
for(int b=0;b<a;b++){
cin>>s;
}
cout<<52-a;
return 0;
} | ALGO | 0.982217 | 3.000516 |
8359b76e-1ddf-4704-bdb3-d576e4c856c8 | Kabir1302/Striver-Sde-Sheet-Challenge | Middle Of Linked List.cpp | /*
Following is the class structure of the Node class:
class Node
{
public:
int data;
Node *next;
Node()
{
this->data = 0;
next = NULL;
}
Node(int data)
{
this->data = data;
this->next = NULL;
}
Node(int data, Node* next)
{
this->data = d... | ALGO | 0.999918 | 5.868049 |
d674cb24-24ab-4148-a4a3-f0e14e85b3f8 | JaeHyoNi/BackJoon | 1915.cpp | #include <bits/stdc++.h>
using namespace std;
int arr[1001][1001];
int main() {
int N,M,MAX = 0; cin>>N>>M;
string str;
for(int i=0;i<N;i++){
cin>>str;
for(int j=0;j<M;j++){
arr[i][j] = str[j]=='0'? 0 : 1;
if(arr[i][j]!=0){
if(MAX == 0) MAX = 1;
if(i-1>=0 && j-1>=0){
if(arr[i-1][j]!=0 && arr... | ALGO | 0.999909 | 3.805623 |
8355a0b0-f349-4ca5-be30-56bfdbee2e2f | Hyp3R0d/AlgorithmCompetition | 动态规划/线性dp/题目/ABC275F.cpp | #include<bits/extc++.h>
using i8 = signed char;
using u8 = unsigned char;
using i16 = signed short int;
using u16 = unsigned short int;
using i32 = signed int;
using u32 = unsigned int;
using f32 = float;
using i64 = signed long long;
using u64 = unsigned long long;
using f64 = double;
using i128 = __int128_t;
using u... | ALGO | 0.999989 | 3.963478 |
c38fb291-ff09-4f28-a7b7-dfdc963e3e7c | vmhl87/oly | ccc/ccc-21/check.cpp | #include <iostream>
#include <set>
using LL = long long;
int main(){
int n, m, k; std::cin >> n >> m >> k;
std::set<int> row, col;
for(int i=0; i<k; ++i){
char c; std::cin >> c;
int w; std::cin >> w;
if((c == 'R' ? row : col).count(w))
(c == 'R' ? row : col).erase(w);
else (c == 'R' ? row : col).inse... | ALGO | 0.999694 | 3.808044 |
f3912521-6a8c-4783-9ea7-4029ebe98ee7 | b4winckler/src-lorenz-renorm-conj | eigen-3.3.4/doc/examples/DenseBase_middleRows_int.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(2..3,:) =\n" << A.middleRows(2,2) << endl;
return 0;
}
| ALGO | 0.955058 | 3.312439 |
2134f2d0-a5a9-49bf-8c76-72e786c75c3e | Gavis420/Project-Euler-1 | problem004/main.cpp | /*
* Gavin Sommers 11/13/24
* A palindromic number reads the same both ways.
* The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 \times 99.
* Find the largest palindrome made from the product of two 3-digit numbers.
*/
#include <iostream>
#include <cmath>
bool isPalindrome(int num) {
... | ALGO | 0.999787 | 6.919898 |
aba755f5-6496-4419-aa9b-2ea37c2f54a9 | RabbleRousy/heureka | Zobrist.cpp | #include "Zobrist.h"
unsigned long long Zobrist::pieceHashes[23][64];
unsigned long long Zobrist::castleHashes[16];
unsigned long long Zobrist::epHashes[65];
unsigned long long Zobrist::whiteToMoveHash;
void Zobrist::initializeHashes() {
std::random_device rd;
std::mt19937_64 rng(rd());
for (int i = 0; i... | ALGO | 0.998647 | 5.673575 |
26e3459e-97ca-40e2-bb5e-cc084359e473 | ishandutta2007/codeforces | qazswedx2/normal/1288/B.cpp | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
typedef long long ll;
int t,n,m;
ll tans;
int main()
{
scanf("%d",&t);
while(t--)
{
scanf("%d%d",&n,&m);
tans=0;
for(ll i=10;i-1<=m;i*=10) tans++;
tans*=n;
printf("%I64d\n",tans);
}
return 0;
} | ALGO | 0.999222 | 3.744109 |
2dfa21d3-22fe-4da4-955f-31a33b082666 | UnsEmp/C_Note | luogu_text/p2404.cpp | #include <cstdio>
#include <iostream>
using namespace std;
int n;
int sum = 0,top = -1,count = 0;
int HashTable[10] = {0};
void dfs(int m)
{
if(sum == n){
count++;
for(int i = 0;i < top;i++){
cout << HashTable[i] << '+';
}
if(count%4 == 0 || HashTable[top] == n){
... | ALGO | 0.999572 | 3.568545 |
4a033fea-a7fd-4b79-86fa-ac46df3bf072 | buptwjf/Leetcode | 0_offer2/search_backtrack/55_ii.cpp | //
// Created by 86188 on 2023/7/22.
//
#include "../include/user.h"
using namespace std;
/*
* 问题:判断一个二叉树是否是平衡二叉树
* 思路:
* 1. 肯定要进行 dfs
* 2. 一个节点作为根节点的子树是平衡二叉树的充要条件:
* 1. 自身左子树和右子树的高度差小于 1
* 2. 左子树和右子树都是平衡二叉树
* */
class Solution {
public:
bool bfs(TreeNode *cur) {
if (cu... | ALGO | 0.999316 | 6.004103 |
05935f12-507a-44f3-aba8-53854a7ed8c4 | KonohaChen/resistorBackEnd | opencv/sources/samples/cpp/lkdemo.cpp | #include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
#include <ctype.h>
using namespace cv;
using namespace std;
static void help()
{
// print a welcome message, and the OpenCV version
cout << "\nThis is a demo ... | ALGO | 0.974035 | 5.957783 |
017f2762-55f2-4aca-9f66-407289930c74 | calmdan/MyLeetcode | Letter Combinations of a Phone Number.cpp | const static string dic[10]={"0","1","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
class Solution {
public:
vector<string> letterCombinations(string digits) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
if(digits.length()==0)
{
vect... | ALGO | 0.9999 | 6.455297 |
1ee0fc35-9a44-4f77-bf01-295481b9cc89 | Caparow/CPP-tasks | AntGraphWithoutSets/AntGraphWithoutSets/Solution.cpp | #include "header.h"
using namespace std;
int main()
{
srand(time(NULL));
restart:
int graph_size;
string filename;
vector<edge> graph;
int iter = 0;
int restart_point = 1000; //number for iterations with same global conflicts before restart
int check_point = 0;
filename = "yuzGCP... | ALGO | 0.998495 | 3.776662 |
c06bdb1b-6d0e-4b37-8774-33672013151c | vfolunin/archives-solutions | UVa Online Judge/900.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <string>
using namespace std;
vector<long long> prepareFib() {
vector<long long> fib = { 1, 1 };
while (fib.size() <= 50)
fib.push_back(fib[fib.size() - 2] + fib.back());
return fib;
}
bool solve() {
... | ALGO | 0.999911 | 4.84247 |
304a26a8-ea36-446f-8b39-a27078b1503a | loveneeshdhir/ACM-ICPC-Algorithms | Greedy/Knapsack/0-1_Knapsackproblem.cpp | #include<iostream>
using namespace std;
int knapSack(int W, int *wt, int *val, int n) {
int K[n+1][W+1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= W; j++) {
if (i==0 || j==0)
K[i][j] = 0;
else if (wt[i-1] <= j)
K[i][j] = max(val[i-1] + K... | ALGO | 0.99999 | 4.822383 |
da187274-c883-414e-becc-ba072bc7af0d | Muhammad-Abu-Yusuf-Nayeem/Data-Structures | 444444444444444444.cpp | #include<bits/stdc++.h>
using namespace std;
int stak[9],top=-1,max_size=8,i;
char str[9]="236*+7-*";
void push(int data)
{
if(top == max_size)
{
printf("Overflow\n");
}
else
{
top=top+1;
stak[top]=data;
printf("%d is pushed\n",data);
}
}
void display()
{
if... | ALGO | 0.999711 | 3.754694 |
4b45436f-39af-4d00-9be8-308c8c9b4d99 | Sayonisahatuktuky/datastructure | Remove_Duplicate_Again.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
list<int>mylist;
int val;
while(true){
cin>>val;
if(val==-1){
break;
}
mylist.push_back(val);
}
mylist.sort();
mylist.unique();
for(int v : mylist){
cout<<v<<" ";
}
cout<<endl;
re... | ALGO | 0.999757 | 3.844214 |
f16b71c3-ae32-4356-9cdf-6dba11352303 | InabaKumori/Tetris | Tetris_Visual_Studio.cpp | #include <iostream>
#include <cmath>
#include <string>
#include <SFML/Graphics.hpp>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <SFML/Audio.hpp>
#include <random>
using namespace std;
using namespace sf;
const int M = 19;
const int N = 10;
struct Point {
int x, y;
} a[4], b[4];
int field... | TOOL | 0.964689 | 4.636426 |
bc62e34f-cf6c-4bc9-bdf5-81322c8481cf | Utkarsh089/CrackYourPlacement | Tree/Symmetric Tree.cpp | // https://leetcode.com/problems/symmetric-tree/
class Solution {
public:
bool isSymmetric(TreeNode* root) {
invertTree(root->right);
return isSame(root->left, root->right);
}
TreeNode* invertTree(TreeNode* root) {
if(root==NULL)
return NULL;
invertTree(root... | ALGO | 0.999913 | 6.908206 |
aabfa7a7-ee44-4355-b487-4808dd2a6d45 | LookAt-MeNow/XTDcode | source/catkin_vio/src/VINS-Fusion/vins_estimator/src/initial/initial_sfm.cpp | #include "initial_sfm.h"
GlobalSFM::GlobalSFM(){}
void GlobalSFM::triangulatePoint(Eigen::Matrix<double, 3, 4> &Pose0, Eigen::Matrix<double, 3, 4> &Pose1,
Vector2d &point0, Vector2d &point1, Vector3d &point_3d)
{
Matrix4d design_matrix = Matrix4d::Zero();
design_matrix.row(0) = point0[0] * Pose0.row(2) - Pose... | ALGO | 0.984749 | 4.633471 |
5bfcbc48-ed76-4d28-a971-703a0e678f12 | hi-ogawa/practice | cses/range_queries/task2166/main.cpp | // AC
#include <bits/stdc++.h>
using namespace std;
#define ALL(X) (X).begin(), (X).end()
#define FOR(I, X, Y) for (auto I = decltype(Y){X}; I < (Y); ++I)
using ll = int64_t;
using ull = uint64_t;
namespace std {
template<class ...Ts> istream& operator>>(istream& i, tuple<Ts...>& x) { apply([&](auto&&...... | ALGO | 0.999869 | 5.547405 |
e2d74c52-90e0-4fc5-a858-7e4df2b26b1c | szymonrychu/ObjectTrackerV2 | jni/recognize.cpp | #include "geometry.h"
using namespace std;
using namespace cv;
class Recognizer{
private:
Mat cameraMat, distMat, map1, map2;
bool processImages;
vector<Mat> tags;
int outline, normSize;
double maxTagSize, minTagSize;
int blockSize;
double adaptThresh;
Point2f norm2DPts[4];
int tagSize, tagKernel;
bool... | TOOL | 0.911208 | 5.634617 |
236ba9ba-df58-4c81-a7ce-a7b4451773cd | euyogi/Problemas-OBI | 2024_2/jogo_do_poder.cpp | // 2024 Fase 2: Jogo do Poder (https://neps.academy/br/exercise/2798)
#include <bits/stdc++.h>
using namespace std;
int h, w;
#define I(i, j) ((i) * w + j)
struct DSU {
DSU(int n, vector<long long>& g)
: parent(n + 1), size(n + 1, 1), value(n + 1), inside(n + 1), around(n + 1) {
for (int i = 0; i... | ALGO | 0.999983 | 4.859006 |
40502637-0493-45a9-b638-30600d4c950a | 2020Michal/Real-Time | Real-Time/Part3/3.1 with priority Inheritance/APP77.CPP | /********************************************************************/
/* A Small Real Time System for the Real-Time laboratory */
/* built by: A.Teitelbaum on an idea of H.G.Mendelbaum */
/* Jerusalem College of Technology, 5759-64 (1999-03) */
/* update Tishrey 5777 ... | ALGO | 0.88232 | 4.022373 |
340d9f77-a413-42f6-b721-bcd9956cee71 | bayashi-cl/procon-submission | atcoder/abc057/abc057_c/24066719.cpp | #pragma region template
#include <atcoder/math>
#include <atcoder/modint>
#include <boost/range/irange.hpp>
// #include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#includ... | ALGO | 0.999913 | 5.344112 |
94eaae6f-6e73-4118-820c-dddf507e6054 | StoneCodingg/Android9.0 | frameworks/av/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp | /*
------------------------------------------------------------------------------
Filename: oversamp_12k8_to_16k.cpp
Date: 05/08/2004
------------------------------------------------------------------------------
REVISION HISTORY
Description:
----------------------------------------------------------------... | ALGO | 0.9988 | 6.132918 |
9e91285a-7a6c-4b4d-9855-e46f77cffa22 | Sid-71/DSA-Questions | Linked List Insertion - GFG/linked-list-insertion.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
struct Node* next;
Node(int x){
data = x;
next = NULL;
}
};
void printList(Node* node)
{
while (node != NULL) {
cout << node->data <<" ";
node = node->next;
} ... | ALGO | 0.999775 | 5.950654 |
c3c3b20c-8ff8-4fca-8d47-f75215ae960c | TWilson2017/Drills-on-Classes-Medium- | a1.cpp | // Consider the class diagram below.
//
// +------------------------------+
// | class STUFF |
// | |
// | +---------------------+ |
// | | int q; | |
// | +---------------------+ |
// |---------------------+ ... | ALGO | 0.985876 | 4.319012 |
8d8980ee-7c2c-4563-aebb-f6e3929ca1e9 | hewenyu/voice-assistant | src/translator/deepl/deeplx_translator.cpp | #include "translator/deepl/deeplx_translator.h"
#include <iostream>
#include <regex>
#include <sstream>
#include <stdexcept>
#include <algorithm>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
namespace {
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) {
userp->appe... | TOOL | 0.864668 | 6.577495 |
cf224aaa-aef0-4b02-9d17-44e357e672ff | kravets-anastasya/Education | first half/7 lesson/целое арифметическое от 1 до 1000.cpp | #include <iostream>
using namespace std;
int main() {
/*Найти среднее арифметическое всех целых чисел от 1 до 1000*/
size_t amount_from = 1000;
size_t initial_number {1};
float sum{};
for (int i = initial_number; i < amount_from; i++)
{
sum += initial_number++;
cout << sum << endl;
}
cout << endl << "... | ALGO | 0.997401 | 3.609435 |
37ae9255-78a2-4c61-9b40-277be57777d1 | Rishikesh-2002/DSA-using-cpp | Array/pair sum.cpp | #include<iostream>
using namespace std;
int main(){
int i,j;
int arr[]={5,9,8,3,7,6,7};
int no=14;
for(i=0;i<7;i++){
for(j=i+1;j<sizeof(arr)/sizeof(arr[0]);j++){
if(arr[i]+arr[j]==no)
cout<<arr[i]<<" "<<arr[j];
}
cout<<endl;
}
} | ALGO | 0.999889 | 3.33096 |
404df1e6-8d3a-425e-ad97-54b5b1cf21bc | lightninghawk110/DSA-CPP | Array/Sum_array_1.cpp | // Given an integer array Arr[] of size N. The task is to find sum of it.
//{ Driver Code Starts
#include <iostream>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
// function to return sum of elements
// in an array of size n
int sum(int arr[], int n)
{
... | ALGO | 0.99932 | 7.082027 |
a657917d-21bb-429f-a4c9-d71cb5f68dc6 | aarti2626/DSA-Project-3-Satisfied-with-Our-Jobs | mergesort.cpp | #include<iostream>
#include<algorithm>
#include <vector>
#include <chrono>
using namespace std;
using namespace std::chrono;
void print(vector<int> arr, int size);
void mergeSort(vector<int>& arr, int l, int r);
void merge(vector<int>& arr, int p, int q, int r);
int main() {
int n;
cout << "Enter the number o... | ALGO | 0.999915 | 5.981862 |
e1daf6bb-a94b-4de5-bf6b-355ba5fadcaf | MHaq23/CC_Solutions-Codechef-Codeforces- | cdasha.cpp | #include<bits/stdc++.h>
using namespace std ;
#define int long long
signed main(){
string s,rev="";
cin>>s;
int dp[s.length()]={0};
for(int i=s.length()-1;i>=0;i--)
rev+=s[i];
if(s[0]==rev[0])
dp[0]=1;
for(int i=1;i<s.length()-1;i++)
{
if(s[i]==rev[i])
dp[i]=1+dp[i-1];
else
... | ALGO | 0.999949 | 3.489481 |
cd8e972e-342b-4b97-b10f-8d7c5e7ae64c | Michiel-Janssen/Raytracing | raytracer/raytracer/raytracers/ray-tracer-v5.cpp | #include "ray-tracer-v5.h"
#include <iostream>
#include <cmath>
#include <list>
using namespace imaging;
using namespace math;
using namespace raytracer;
using namespace raytracer::raytracers;
using namespace raytracer::raytracers::_private_;
Color RayTracerV5::process_light_ray(const Scene& scene, const Materia... | ALGO | 0.852931 | 5.206577 |
be5aee12-8ee8-42b3-ab26-a11d85190ada | pstegagno/cam_array | camera_array_arm/src/ImageAnalyzer/ndvi_clustering_parabola.cpp |
#include <ImageAnalyzer/ImageAnalyzer.hpp>
#define DEBUG_NDVI_CLUSTERING_PARABOLA 1
#define DEBUG_NDVI_CLUSTERING_PARABOLA_DEEP 0
void CameraArrayProject::ImageAnalyzer::eq_parabola(float value, float x_v, float y_v, float x_p, float y_p, float ¶bola )
{
float a, b, c;
a=(y_p-y_v)/((x_p-x_v)*(x_p-x_v));
c=y_... | ALGO | 0.995861 | 3.75951 |
6648cbd3-0145-487a-ac02-5b9fb7831f19 | BardStory/OpenGL | Assignment1/Program2/main.cpp | /*
Author: Joshua Bard
Athabasca ID: 3453236
Assignment: COMP 390 TME1 Program 2 2D Graphics
The editor used was Microsoft Visual 2022
This Program draws a house in OpenGL and then uses Transformation and Rotation to add 4 additional houses.
Headers:
-Initialise sets the background colour to white
-Render sets the ... | ALGO | 0.882287 | 4.185103 |
e018e72a-7252-46d6-b03e-bb356c28a581 | ReZeroS/LeetCode | 26.Remove Duplicates from Sorted Array/test.cpp | class Solution {
public:
int removeDuplicates(vector<int>& nums) {
if(nums.size() == 0){
return 0;
}
for(auto iter = nums.begin() + 1; iter != nums.end(); ++iter){
if( *iter == *(iter-1) ){
iter = nums.erase(iter) - 1;
}
}
... | ALGO | 0.999838 | 6.361728 |
70f4de9e-cb7b-4744-aaef-7a89f12dc592 | cyberdstar/opencv_contrib | modules/tracking/src/trackerCSRTScaleEstimation.cpp | #include "precomp.hpp"
#include "trackerCSRTScaleEstimation.hpp"
#include "trackerCSRTUtils.hpp"
//Discriminative Scale Space Tracking
namespace cv
{
class ParallelGetScaleFeatures : public ParallelLoopBody
{
public:
ParallelGetScaleFeatures(
Mat img,
Point2f pos,
Size2f base_target_sz,
... | ALGO | 0.995602 | 6.26122 |
7df71915-5024-4d2c-bdbe-e1622600a4f9 | tzupengwang/PECaveros | contest/WorldFinals/2012/f.cpp | #include<bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
int keys[30][2];
vector<int> v[30];
bool ext[30];
int tkey[2];
int whos[30];
ii ans;
bool vis[30];
int dp[30][2];
bool dfs(int x) {
bool ret = false;
vis[x] = true;
dp[x][0] = dp[x][1] = 1000000;
if (whos[x] != 0) ret = true;
if (whos... | ALGO | 0.999453 | 3.566307 |
c234e3e5-7084-4268-91ac-a8b7232d3806 | wvu-navLab/gnss-ins-zupt | GNSS_INS_ZUPT/3rdparty/RobustGNSS/gtsam/gtsam/3rdparty/Eigen/doc/examples/TutorialLinAlgExComputeSolveError.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
MatrixXd A = MatrixXd::Random(100,100);
MatrixXd b = MatrixXd::Random(100,50);
MatrixXd x = A.fullPivLu().solve(b);
double relative_error = (A*x - b).norm() / b.norm(); // norm() is L2 norm
cout << "The ... | ALGO | 0.999775 | 3.626518 |
d4e278d7-c0e1-4884-86ef-ddbf226a1d7f | harshjoshiiii/leetcode | 0118-pascals-triangle/0118-pascals-triangle.cpp | class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>>ans(numRows);
for(int i=0;i<numRows;i++)
{
ans[i] = vector<int>(i+1,1);
for(int j=1;j<i;j++)
{
ans[i][j] = ans[i-1][j] + ans[i-1][j-1];
}
... | ALGO | 0.999977 | 5.482771 |
4d78458a-b3e7-4157-8ba6-4b533da903e8 | tin10401/CodeForces | CodeForces/intereting_string_puzzle_GFG_CONTEST.cpp | //████████╗██╗███╗░░██╗██╗░░░░░███████╗
//╚══██╔══╝██║████╗░██║██║░░░░░██╔════╝
//░░░██║░░░██║██╔██╗██║██║░░░░░█████╗░░
//░░░██║░░░██║██║╚████║██║░░░░░██╔══╝░░
//░░░██║░░░██║██║░╚███║███████╗███████╗
//░░░╚═╝░░░╚═╝╚═╝░░╚══╝╚══════╝╚══════╝
// __________________
// | ________________ |
// || ____ ||
// ||... | ALGO | 0.998626 | 3.511052 |
514e8e84-6beb-4e51-a538-85396759485f | lam-ntt/practice-at-ptit | dsa/DSA02024_day_con_tang_dan.cpp | #include<bits/stdc++.h>
using namespace std;
int n, a[25], A[25];
set<string> st;
void read(){
cin >> n;
for(int i=1; i<=n; i++){
cin >> A[i];
}
}
void check(){
int cnt=0;
for(int i=1; i<=n; i++){
if(a[i]) ++cnt;
}
if(cnt<2) return;
int tmp=-1;
for(int i=1; i<=n; i++){
if(a[i]){
if(A[i]>=tmp) tmp... | ALGO | 0.999823 | 4.183853 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.