uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
1610ab5e-ae1d-487b-b057-995ca22d252d | Mosquito19/NoteOfORBSlam2 | src/KeyFrameDatabase.cpp | #include "KeyFrameDatabase.h"
#include "KeyFrame.h"
#include "Thirdparty/DBoW2/DBoW2/BowVector.h"
#include<mutex>
using namespace std;
namespace ORB_SLAM2
{
KeyFrameDatabase::KeyFrameDatabase (const ORBVocabulary &voc):
mpVoc(&voc)
{
mvInvertedFile.resize(voc.size()); // number of words
}
/**
* @brief 根据... | ALGO | 0.998072 | 4.408116 |
64834a0a-69df-47d4-9433-2c9d05fee87d | MONSIEURBIR/UnrealSurvivalgameUE5 | Source/SurvivalGame/Private/AI/BTTask_FindPatrolLocation.cpp | #include "AI/BTTask_FindPatrolLocation.h"
#include "AI/SBotWaypoint.h"
#include "AI/SZombieAIController.h"
/* AI Module includes */
#include "BehaviorTree/BehaviorTreeComponent.h"
#include "BehaviorTree/BlackboardComponent.h"
/* This contains includes all key types like UBlackboardKeyType_Vector used below. */
#includ... | ALGO | 0.992669 | 6.295828 |
f6eaef1e-0e53-43a0-962a-b11e02198cd4 | Sourav61/DSA-Practice | LeetCode/Medium/SurroundedRegions.cpp | // https://leetcode.com/problems/surrounded-regions/
#include <bits/stdc++.h>
using namespace std;
class Solution
{
private:
void dfs(int row, int col, vector<vector<int>> &vis, vector<vector<char>> &mat, int delrow[], int delcol[])
{
vis[row][col] = 1;
int n = mat.size();
int m = mat... | ALGO | 0.999728 | 6.575207 |
227a185f-671f-43af-9d65-dbb59b4b4889 | zahraaliloutfi/ITIshopApp | 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.998776 | 6.763923 |
9a1112eb-d28f-4831-9ef9-9e064e849e67 | shrutsureja/competitive-programming | codeforces/CF#853/A_Serval_and_Mocha_s_Array.cpp | #include <vector>
#include <bits/stdc++.h>
#include <string>
#include <cmath>
typedef long double ld;
#define fr(n) for (int i = 0; i < n; i++)
#define freq1(n) for (int i = 1; i <= n; i++)
#define freq(n) for (int i = 0; i <= n; i++)
#define fra(a, n) for (int i = a; i < n; i++)
#define ll long long int
#define endl... | ALGO | 0.995284 | 3.692509 |
63c83328-fbc6-4dfe-8348-fddd21211374 | oneskovic/CP-Problems | CodeForces/Global Round 14/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int test_cnt; cin>>test_cnt;
while(test_cnt--)
{
int n, x; cin>>n >> x;
vector<int> elements(n);
for(int i = 0; i < n; i++)
cin>>elements[i];... | ALGO | 0.999966 | 4.030684 |
3e1d6634-880d-4305-8a52-69d06db9b041 | ryoya-i-1215/algo | ABC392/A-Shuffled-Equation.cpp | #include <iostream>
#include <array> // 追加
#include <algorithm> // sort関数のために追加
using namespace std;
int main() {
int A1,A2,A3;
cin >> A1 >> A2 >> A3;
array<int, 3> A = {A1, A2, A3};
// 昇順に並び替える
sort(A.begin(), A.end());
int B1 = A[0];
int B2 = A[1];
int B3 = A[2];
if(
B1 * B2 == B3
){
... | ALGO | 0.999982 | 4.607341 |
c4d301de-0360-47c6-9ca1-f5e2a10d8df9 | shannon-vaz/Advanced-Data-Structures | min-heap/min_heap_using_pointers.cpp | //implementation of min heap
#include<iostream>
using namespace std;
typedef struct node
{
int key;
struct node *parent;
struct node *left_child;
struct node *right_child;
struct node *next;
}node;
typedef struct list
{
node *head; //start of heap
node *last_node; //last node added into ... | ALGO | 0.999318 | 4.912721 |
a3462146-0f02-4864-b23e-f6d56765512c | Pedrammdp/C-LC | BaseballGameWithStack.cpp | #include <ctype.h>
#include<iostream>
#include<vector>
#include <string>
#include<numeric>
#include <stack>
using namespace std;
class BaseballGame {
public:
int calPoints(vector<string>& operations) {
stack<int> st;
for(int i = 0; i < operations.size(); i++)
{
if (st.empty()... | ALGO | 0.999864 | 6.111353 |
f2121fbb-9a41-4b0f-8e14-1c2c0ccaa9c3 | raincross7/code-similarity | codes/train_code/problem499/problem499_412.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define MOD 1000000007
const int INF = 1LL<<30;
int main(){
int n;
cin>>n;
map<string,ll> m;
rep(i,n){
string s;
cin>>s;
sort(all... | ALGO | 0.999981 | 4.072097 |
b85f924f-83a6-4598-be08-4119add8f679 | tmuttaqueen/MyCodes | Online Judge Code/hacker rank/101 Hack April 2017/Dreamplay and the String Game.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
const double pi = 3.141592653589793;
#define xx first
#define yy second
#define mp make_pair
#define intl long long
#define filein... | ALGO | 0.99997 | 4.352926 |
3728b71f-ec15-4682-9a2c-25c4d1a138a8 | mrxYan6/mrx-s-ACM-templates | sources/Math/phi.cpp | long long phi(long long x){
long long res = x, m;
m = sqrt(x);
for(long long i = 2;i <= m;++i){
if(x % i == 0){
x /= i;
res -= res / i;
while(x % i == 0)x /= i;
}
}
if(x > 1)res -= res / x;
return res;
} | ALGO | 0.999789 | 3.978306 |
451a028e-f2ab-4926-8c48-7eb0502c5dde | Avinash192211117/avinash | eligible to vote.cpp | #include <stdio.h>
int main()
{
int vote_age;
printf("Input the age of the candidate : ");
scanf("%d",&vote_age);
if (vote_age<18)
{
printf("you are not eligible.\n");
printf("You are allowed to vote after %d year.\n",18-vote_age);
}
else
printf("you are eligible.\n");
}
| TOOL | 0.948681 | 3.496863 |
b67d5d09-db82-49a4-b73f-df2307c711a8 | BlueSu007/LocalDisk-D | Codes/解题程序/10.1 Training/05 Homework/03:导弹拦截.cpp | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <climits>
using namespace std;
#define LEN 100005
int n , a[LEN] , seq1[LEN] , seq2[LEN] ;
int main () {
while ( scanf ( "%d" , &a[++n] ) != EOF ) ;
n-- ;
int len1 = 1 , len2 = 1 ;
seq1[1] = a[1] , seq2[1] = a[1] ;
for ( i... | ALGO | 0.999605 | 3.513782 |
283027a6-4faa-4ed9-bc80-810f64f9b691 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/Mixtral/top0-100/number-of-restricted-paths-from-first-to-last-node-Solution.countRestrictedPaths/177788_DoS_Exec_Code_Overflow.cpp | void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
Stream *str, int width, int height,
GfxImageColorMap *colorMap,
Stream *maskStr,
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap) {
double *ctm;
SplashCoord mat[6];
SplashOutImageData imgData;
... | TOOL | 0.988205 | 4.609697 |
74adf5aa-97dd-4c81-932e-d2cae515c168 | SSDGK/- | 模板/图和树/线段树/开点线段树模板.cpp | #include <iostream>
using namespace std;
#define maxn 100000
int cnt;
int leftNode[maxn];
int rightNode[maxn];
long long sum[maxn];
long long add[maxn];
int ope[maxn][4];
void lazy(int i, long long jobv, int size)
{
sum[i] += jobv * size;
add[i] += jobv;
}
void up(int i)
{
sum[i] = sum[leftNode[i]] + sum[rightNode... | ALGO | 0.999922 | 3.846065 |
3a1c658a-253d-4b45-9c09-a737962a87dc | julianeisel/value_ladders | extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp | //#if defined (_WIN32) || defined (__i386__)
//#define BT_USE_SSE_IN_API
//#endif
#include "btConvexHullShape.h"
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
#include "LinearMath/btQuaternion.h"
#include "LinearMath/btSerializer.h"
btConvexHullShape ::btConvexHullShape (const btScalar* points,int n... | ALGO | 0.993675 | 7.011924 |
56e3570c-0665-485e-aa5a-7ae867412635 | petru-braha/class-oop | oop/homework/HH11/petru_code/petru_correct.cpp | #include <stdio.h>
#include <cstdio>
template <class banana>
size_t partition(banana arr[], size_t index_start, size_t index_end)
{
size_t pivot = arr[index_start];
int count = 0;
for (int i = index_start + 1; i <= index_end; i++)
if (arr[i] <= pivot)
count++;
size_t pivot_index =... | ALGO | 0.999221 | 4.93551 |
a2ab5517-1978-41da-a1e4-e198cc89ff43 | Ngufuli/cpp | hackerrank.cpp | #include<iostream>
using namespace std;
class A
{
protected:
int x, y, z;
};
class B : public A
{
public:
void getdata()
{
cout<<"Enter the first number\n";
cin>>x;
cout<<"Enter the second number\n";
cin>>y;
cout<<"Enter the third number\n";
c... | ALGO | 0.939626 | 3.697807 |
1f8aa6f9-f063-43f2-8637-41d0a6c10d78 | allenge007/my_cpp_code | CodeMountain/CSP-J2024T4.cpp | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, k, q;
void solve() {
scanf("%d%d%d", &n, &k, &q);
}
int main() {
int T;
scanf("%d", &T);
while(T --) solve();
return 0;
} | ALGO | 0.9991 | 3.211864 |
272bafb9-7922-42cc-a01f-dd99f13ce7d7 | nazibur175/C- | C_Two_Arrays.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9, mod = 1e9 + 7;
#define int long long int
int f[N], inv[N], finv[N];
void prec() {
f[0] = 1;
for (int i = 1; i < N; i++) f[i] = 1LL * i * f[i - 1] % mod;
inv[1] = 1;
for (int i = 2; i < N; i++ ) {
inv[i] = (-(1LL * mod / i) * inv[mod % i] ) ... | ALGO | 0.999962 | 4.97339 |
a44d5520-d38d-4877-bf24-68ceac06318d | md-mohabbat-ezekiel/Phitron-3 | Data structure/module 4/Duplicate.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
sort(a,a+n);
bool dup=false;
for(int i=1;i<n;i++)
{
if (a[i]==a[i-1])
{
dup=true;
break;
}
}
if(dup)
{
cout<<"YES"<<endl;
}
else
{
cout... | ALGO | 0.999968 | 3.765332 |
3d146543-ebd7-444c-842c-6683b8850c7b | checkoutb/LeetCodeCCpp | daily_challenge/2021/LT_2021-07-01_Lowest_Common_Ancestor_of_a_Binary_Tree.cpp |
#include "../../header/myheader.h"
class LT
{
public:
// D D
// TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) {
// if (root == NULL || root == p || root == q)
// return root;
// TreeNode* left = lowestCommonAncestor(root->left, p, q);
// TreeNode* right ... | ALGO | 0.999994 | 4.570189 |
f6fbe19b-d624-4841-b500-17983e0f4b6d | josuerom/Competitive-Programming | Contests/CodeForces/Solved-Problems23/750A_New_Year_and_Hurry.cpp | /**
* author: josuerom
* created: 19/03/23 23:50:45
**/
#pragma GCC optimize("03,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
void dbg_out() { cout << endl; }
template<typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) { cout << ' ' << H; dbg_out(T...); }
#define dbg(...) cout << "("... | ALGO | 0.999856 | 3.961271 |
381364f8-c411-4409-947d-0ef8439488b1 | huutrungle2001/OLP_Practice | OLP Session/HelloWorld.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<int> v = {1, 2, 3, 4, 5};
vector<int> a;
a = v;
for(int i : a){
cout << i << " ";
}
} | ALGO | 0.997963 | 3.433348 |
afdd65e1-69a4-48a6-861b-48c92ff42fd5 | shivkaraman/DSA | 01_Pep coding/Level 2/04_Trees/18_LeftView_Of_Btree.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
class TreeNode{
public:
int val = 0;
TreeNode *left = nullptr;
TreeNode *right = nullptr;
TreeNode(int val){
this->val = val;
}
};
vector<int> leftView(TreeNode *root){
vector <int> ans;
queue <TreeNode*> ... | ALGO | 0.999997 | 4.94667 |
e55dfb80-5e49-415a-9a15-b5418e199402 | sinian666/code_41_27 | 1cpp/chapter_graph/graph_dfs.cpp | /**
* File: graph_dfs.cpp
* Created Time: 2023-03-02
* Author: Krahets (<EMAIL>)
*/
#include "../utils/common.hpp"
#include "./graph_adjacency_list.cpp"
/* 深度优先遍历 DFS 辅助函数 */
void dfs(GraphAdjList &graph, unordered_set<Vertex *> &visited, vector<Vertex *> &res, Vertex *vet) {
res.push_back(vet); // 记录访问顶点
... | ALGO | 0.999911 | 6.047087 |
8a60bd8b-dca4-4cf8-9a04-c2b6fd7aa257 | gamurphy/ABITstarAlgorithm | src/ompl/multilevel/planners/qmp/src/QMPImpl.cpp | /* Author: Andreas Orthey, Sohaib Akbar */
#include <ompl/multilevel/planners/qmp/QMPImpl.h>
#include <ompl/tools/config/SelfConfig.h>
#include <boost/foreach.hpp>
#include <ompl/datastructures/NearestNeighbors.h>
#include "ompl/datastructures/PDF.h"
#include <ompl/geometric/PathGeometric.h>
#include <ompl/multilevel/... | ALGO | 0.998026 | 6.009682 |
70243153-02f9-49da-b960-72624df71a76 | AhzamZobairi-dev/Decode-DSA-Cpp-2.0- | Assignment/Wk4/Functions/02.Area_of_circle.cpp | //Q2 : Write a function that takes the radius of a circle as an argument and returns its area.
#include <iostream>
using namespace std;
float getArea(int r)
{
return 3.14159*r*r;
}
int main()
{
int r;
cout << "Enter a radius : ";
cin >> r;
cout << "The area of circle with radius " << r << " is "... | ALGO | 0.986193 | 3.240615 |
e4fd89f7-6e74-4ede-9200-e6d6dc01e306 | rochus-keller/Qt-4.8.7 | tools/qdoc3/editdistance.cpp | /*
editdistance.cpp
*/
#include "editdistance.h"
QT_BEGIN_NAMESPACE
int editDistance( const QString& s, const QString& t )
{
#define D( i, j ) d[(i) * n + (j)]
int i;
int j;
int m = s.length() + 1;
int n = t.length() + 1;
int *d = new int[m * n];
int result;
for ( i = 0; i < m; i++ )
... | ALGO | 0.996878 | 5.961704 |
8c995d0d-ccfa-4205-a4c8-8a3615eba553 | alexandraback/datacollection | solutions_2749486_0/C++/ser398/main.cpp | #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <string>
#define mp make_pair
using namespace std;
typedef pair<pair<int,int>,int > piii;
const int m=210;
piii q[m*m*510];
int f[m][m][510];
int d[m][m][510];
int qb=0,qe=0;
bool corect(int x)
{
if(x<0)
return 0;
if(x>=m)
r... | ALGO | 0.999953 | 3.14221 |
c35a1acb-7c5f-4a6a-938d-781000df3adc | smitgajjar/Competitive-Programming | leetcode/All/Reverse String.cpp | class Solution {
public:
void reverseString(vector<char>& s) {
int n=s.size();
for(int i=0; i<n/2; i++)
swap(s[i], s[n-i-1]);
}
}; | ALGO | 0.998698 | 6.126176 |
be922398-d17b-424c-9336-c31db68f3ae7 | kunyavskiy/competitive-programming-archive | TopCoder/srms/783/CardboardBoxes.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <stack>
#include <algorithm>
#include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <iterator>
#include <functi... | ALGO | 0.999861 | 4.509344 |
0b318974-23b1-43b2-9e26-90845215f694 | arif-03/codes | A_Elephant.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<char> vchar;
typedef vector<string> vstr;
#define endl '\n'
#define Ariful ios_base::sync_with_stdio(false);
#define Islam cin.tie(NULL); cout.tie(NULL);... | ALGO | 0.999785 | 5.281934 |
60de17a5-a083-41f8-86f4-435bb748e4f5 | steffi4321/lex_omega_mdp | src/storm/storage/jani/localeliminator/EliminateAutomaticallyAction.cpp | #include "EliminateAutomaticallyAction.h"
#include "EliminateAction.h"
namespace storm {
namespace jani {
namespace elimination_actions {
EliminateAutomaticallyAction::EliminateAutomaticallyAction(const std::string& automatonName, EliminateAutomaticallyAction::EliminationOrder order,
... | ALGO | 0.994553 | 7.64278 |
fc46057a-3528-4d92-907f-c2e3f7e52168 | MedAzizTousli/Competitive-Programming-Solutions | AtCoder/ABC043/B_Unhappy_Hacking_ABC_Edit_.cpp | #include <bits/stdc++.h>
#define ll long long
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) // rep(i, 1, 5) --> {1,2,3,4} // rep(i, 5, 1) --> {4,3,2,1} // rep(it, end(v), begin(v)) --> *it
using namespace std;
int main()
... | ALGO | 0.99998 | 4.453148 |
f1714141-832b-4f7f-a135-3bc5ca6f3042 | Shirinboyev/new_func | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998859 | 6.785645 |
ef7fbae7-9135-452b-8bc0-0da08ee033df | ICPCMansoura/Level-1-2024-2025-Sheets-solutions | Phase 1 - Sheet #5 Recursion and Backtracking/Phase 1 - Sheet #1 Adhocs & Two Pointers/M.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
//freopen("paintbarn.in", "r", stdin);
// freopen("paintbarn.out", "w", stdout);
int n , x;
cin >> n >> x;
vector<ll>nums(n+1);
for (int i = 1; i <=n; ++i) {
cin >>nums[i];
nums[i]+=nums[i-1];
}
m... | ALGO | 0.999905 | 3.80613 |
5b822a13-2b18-4311-821a-4c1fdd1db868 | VoltageOS/bootable_recovery | install/adb_install.cpp | #include "install/adb_install.h"
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <atomic>
#include <functional>
#include <map... | TOOL | 0.920286 | 7.233411 |
e89f3289-d1d8-4f50-b4d9-c0102a381c37 | Nirob-0812/acade.studio | Codefroces/(76 D. Plus and xor)/(76 D. Plus and xor).cpp | #include <iostream>
#include <cstdint>
int main() {
uint64_t A, B;
std::cin >> A >> B;
if (A < B || (A - B) % 2 != 0) {
std::cout << "-1\n";
return 0;
}
uint64_t X = (A - B) / 2;
uint64_t Y = A - X;
std::cout << X << " " << Y << "\n";
return 0;
} | ALGO | 0.999788 | 5.360097 |
8d833be8-e2e0-45ee-a4cd-0adb70986067 | Soumyadip54321/CPP_Codes | CODESTUDIO/interestingpattern.cpp | #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <vector>
using namespace std;
vector<vector<char>> interestingPattern(int n);
int main(){
vector<vector<char>> pattern;
pattern=interestingPattern(4);
return 0;
}
vector<vector<char>> interestingPattern(int n){
ve... | ALGO | 0.999257 | 3.620867 |
543c7f5d-e0dc-4ca8-a71e-4a801f246cb8 | yancouto/competitive-programming | ojs/cf/766D.cpp | #include <bits/stdc++.h>
using namespace std;
#define fst first
#define snd second
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
const ll modn = 1000000007;
inline ll mod(ll x) { return x % modn; }
#ifdef ONLINE_JUDGE
# define debug(args...) {}
#else
# define debug(args...) fprintf(stderr, args... | ALGO | 0.99998 | 3.973025 |
6e553bb3-f611-4105-9228-8c201233f58f | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_10733_10.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e3 + 5;
static int T, N, V, X[MAXN], Y[MAXN];
static vector<int> edge[MAXN];
inline int find_node(int root) {
static int vis[MAXN];
queue<int> Q;
memset(vis, 0, sizeof vis);
Q.push(root);
vis[root] = 1;
while (!Q.empty()) {
int u = Q.front(... | ALGO | 0.999548 | 4.115675 |
5f9c6fa8-a1b1-49b7-9ff6-d9238661705d | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_8483_70.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int min;
if (a < b)
min = a;
else
min = b;
int remaining = (a + b) - (2 * min);
cout << min << " " << remaining % 2;
}
| ALGO | 0.999943 | 4.439502 |
29d48d37-ddac-45f2-8c87-bc7c1ce4f4e0 | molloy-lab/Dollo-CDP | src/boost_1_80_0/libs/graph/example/bfs_neighbor.cpp | #include <boost/config.hpp>
#include <algorithm>
#include <vector>
#include <utility>
#include <iostream>
#include <boost/graph/graph_utility.hpp>
#include <boost/graph/visitors.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/neighbor_bfs.hpp>
#include <boost/property_map/property_map.hpp>
/*
... | ALGO | 0.999014 | 6.63378 |
9bad140c-9978-474e-bd8f-211cf637d9f9 | JustinThorp/CERFIT | src/find_split.cpp | //#define ARMA_DONT_PRINT_ERRORS
#include <RcppArmadillo.h>
#include <vector>
//[[Rcpp::depends(RcppArmadillo)]]
using namespace Rcpp;
// [[Rcpp::export]]
List find_split(const arma::vec &y,const arma::vec &x,const arma::vec &trt, //arma::mat z_mat,
const NumericVector &cutpts,String method,arma::vec &propensity, doub... | ALGO | 0.998434 | 5.17631 |
a13b54b4-d902-476f-8807-7085ba3b1d1f | hahnsangkim/06.t2p1ekf | src/kalman_filter.cpp | #include <iostream>
#include "kalman_filter.h"
#include "tools.h"
using namespace std;
KalmanFilter::KalmanFilter() {
x_ = VectorXd(4);
x_.fill(0.0);
P_ = MatrixXd(4, 4);
P_.fill(0.0);
F_ = MatrixXd(4, 4);
F_.fill(0.0);
Q_ = MatrixXd(4, 4);
Q_.fill(0.0);
NIS_radar_ = 0;
NIS_laser_ = 0;
}
KalmanFi... | ALGO | 0.98396 | 5.401302 |
7c2ccfbe-7255-48f4-b647-a5b668ce18f1 | firiexp/contest_log | atcoder/Other/s8pc-6-C.cpp | #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;
template<class T> constexpr T INF = ::numeric_limits<T>::... | ALGO | 0.999907 | 3.712649 |
95a5db15-166f-474d-a11d-51ddbe6caa3d | AA-S/UVA-Problems-Solutuion | 10789 - Prime Frequency.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<algorithm>
using namespace std;
bool prime(int num)
{
if(num==1) return false;
for(int i=2; i<=sqrt(num); i++)
{
if(num%i==0)
return false;
}
return true;
}
int main()
{
char c... | ALGO | 0.999915 | 3.929363 |
33ac9f35-218a-4652-8733-fa803e22710d | north-h/Match_code | 2023/Luogu/P3372_模板线段树_1.cpp | /*
* ==================================================================================
* Author: north_h
* Time: 2023-11-09 00:57:54
*
* Problem: P3372 【模板】线段树 1
* Contest: Luogu
* URL: https://www.luogu.com.cn/problem/P3372
* MemoryL: 125 MB
* TimeL: 1000 ms
* =====================================... | ALGO | 0.999953 | 5.28019 |
2f97237a-77dc-41b0-b1b1-adf228e3fd9e | jimingee/Algorithm_study | C++/DS_1_2.LinkedList.cpp | #include<iostream>
using namespace std;
class Node {
public:
int data;
Node* next;
};
Node* head;
int empty() {
if (head == NULL) { return 1; }
else { return 0; }
}
void addFront(int data) {
Node* new_node = (Node*)malloc(sizeof(Node));
new_node->data = data;
new_node->next = NULL;
if (empty()) {
head = ... | ALGO | 0.998733 | 4.036879 |
98bda7f2-bed3-469c-9b1b-68445467c36a | choudharyaamir828/dsa_practic | demo2.cpp | #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int8_t sum=0;
for(int i=0;i<n;++i){
sum+=i;
}
cout<<sum<<endl;
return 0;
}
| ALGO | 0.999045 | 4.023496 |
3d5c544b-c9d5-429e-81dc-be5a1bbcefb5 | cpvrlab/SLProject | externals/libigl/include/igl/group_sum_matrix.cpp | template <typename T>
IGL_INLINE void igl::group_sum_matrix(
const Eigen::Matrix<int,Eigen::Dynamic,1> & G,
const int k,
Eigen::SparseMatrix<T>& A)
{
// number of vertices
int n = G.rows();
assert(k > G.maxCoeff());
A.resize(k,n);
// builds A such that A(i,j) = 1 where i corresponds to group i and j
... | ALGO | 0.999587 | 6.379664 |
06decd30-f129-40e0-8359-b0917a76d915 | HaoZhang16/NKU_ParallelProgramming | lab2_simd/ann_test/hnswlib/tests/cpp/sift_1b.cpp | #include <iostream>
#include <fstream>
#include <queue>
#include <chrono>
#include "../../hnswlib/hnswlib.h"
#include <unordered_set>
using namespace std;
using namespace hnswlib;
class StopW {
std::chrono::steady_clock::time_point time_begin;
public:
StopW() {
time_begin = std::chrono::steady_clock... | ALGO | 0.979707 | 3.326661 |
92e718b0-d856-45ab-8564-183f9d2e04ca | aditya-sengupta/simea | lib/eigen-3.3.7/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
MatrixXf m(2,2);
m << 1,-2,
-3,4;
cout << "1-norm(m) = " << m.cwiseAbs().colwise().sum().maxCoeff()
<< " == " << m.colwise().lpNorm<1>().maxCoeff() << endl;
cout << "infty-norm(m... | ALGO | 0.999646 | 4.076589 |
c4ea9fbe-d22e-4b59-8e28-914cb5a7bff2 | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/13/32/17.cpp | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespa... | ALGO | 0.999858 | 3.416006 |
24eacc84-6644-4225-b9da-45b2e6b055b5 | scloke/SegTest | Supporting Files/Software/bgslibrary-master/src/algorithms/dp/ZivkovicAGMM.cpp | #include "ZivkovicAGMM.h"
#if CV_MAJOR_VERSION >= 2 && CV_MAJOR_VERSION <= 3
using namespace bgslibrary::algorithms::dp;
ZivkovicAGMM::ZivkovicAGMM()
{
m_modes = NULL;
m_modes_per_pixel = NULL;
}
ZivkovicAGMM::~ZivkovicAGMM()
{
delete[] m_modes;
delete[] m_modes_per_pixel;
}
void ZivkovicAGMM::Initalize(co... | ALGO | 0.98798 | 4.429199 |
b0b7349e-d257-4a35-91f6-62d9e6cb002d | yusifaliyevpro/Competitive-Programming | LeetCode/Medium/881. Boats to Save People.cpp | // 881. Boats to Save People
// https://leetcode.com/problems/boats-to-save-people/
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int numRescueBoats(vector<int>& people, int limit) {
}
}; | ALGO | 0.999934 | 5.548345 |
d0a5b1a3-4934-4c6b-84f0-3ef91479a1f3 | AniketKalkundri19/Cognifyz_Internship_Task | TASK 8/ArraySorting.cpp | #include<iostream>
using namespace std;
int main(){
cout<<"Enter length of array :: ";
int n , temp ;
cin>>n;
int arr[n];
cout<<"\nEnter "<<n<<" array elements ::";
for(int i = 0 ; i < n ; i++){
cin>>arr[i];
}
cout<<"Ascending order or Decending order (A or D)\n ";
char op;
... | ALGO | 0.99911 | 3.704757 |
0373cf28-c8ca-43b8-a4c9-860e1922a328 | mquang279/DSA | 22. Stack/stack02.cpp | /*
[Ngăn Xếp]. Bài 2. Thao tác cơ bản với ngăn xếp 2
Yêu cầu bạn xây dựng một stack với các truy vấn sau đây:
push x : Thêm phần tử x vào stack.
top : In ra phần tử đầu tiên của stack.
Nếu stack rỗng, in ra NONE .
pop : Xóa phần tử đầu tiên của stack. Nếu stack rỗng, không làm gì cả.
Đầu vào:
-Dòng đầu tiên là số lượn... | ALGO | 0.999602 | 5.685419 |
690cbc49-672f-4c5b-a4cc-c8e9600c8bd7 | Lawrence-ID/GEM5 | src/systemc/tests/systemc/misc/stars/star103832/star103832.cpp | /*****************************************************************************
star103832.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/*************************************************************************... | TEST | 0.851188 | 5.709166 |
803e5e49-cfa8-4848-960d-947d5269aef5 | zzzzDenzzzz/HomeWork_6 | Pointer/Task_6.cpp | /* , .*/
#include<iostream>
void swap(int *a, int *b)
{
int variable = *a;
*a = *b;
*b = variable;
}
void print(int *a, int *b)
{
std::cout << "a = " << *a << " ";
std::cout << "b = " << *b;
std::cout << std::endl;
}
int main()
{
int a = 178;
int b = 253;
print(&a, &b);
swap(&a, &b);
print(&a, &b)... | ALGO | 0.995669 | 4.526844 |
deae4f0f-e3df-433a-837c-6cddb8c23709 | fhvirus/CodeArchive | Zerojudge/#D/#649-數字三角形.cpp | #include<iostream>
using namespace std;
int main(){
int n,i,j;
while(cin>>n){
if(n==0)break;
for(i=0;i<n;i++){
for(j=0;j<n-i-1;j++){
cout<<'_';
}
for(j=0;j<i+1;j++){
cout<<'+';
}
cout<<endl;
}
cout<<endl;
}
return 0;
} | ALGO | 0.999899 | 3.241307 |
a55c2814-a731-4e81-941c-bfbf704042ab | Ryednap/Coding-Competition | Google/CodeJam2021/Qualification/A.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "uj.h"
#endif
// O(n ^ 2) algorithm
void Solve() {
int n;
scanf("%d", &n);
vector<int> arr(n);
for(int & x : arr) {
scanf("%d", &x);
}
int ans = 0;
for(auto itr = arr.begin(); itr != arr.end() - 1; ++itr) {
auto j = min_element(itr, arr... | ALGO | 0.999453 | 4.018583 |
b8ac2972-806a-42ed-bdd5-88484a8794f2 | sangeeta0201/fpsanitizer | llvm/tools/clang/lib/Serialization/ModuleManager.cpp | #include "clang/Serialization/ModuleManager.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/MemoryBufferCache.h"
#include "clang/Basic/VirtualFileSystem.h"
#include "clang/Frontend/PCHContainerOperations.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/ModuleMap.h"
... | TOOL | 0.873703 | 7.873208 |
f4037799-b0a9-486a-b383-f9bed7e301f8 | AlexSkillen/NOVA | src/parallelCom/parallelCom.cpp | #include "parallelCom/parallelCom.h"
#include <sstream>
#include <fstream>
#ifdef HAVE_MPI
boost::mpi::environment parallelCom::env_;
#ifdef HAVE_MUI
boost::mpi::communicator parallelCom::world_(mui::mpi_split_by_app(), boost::mpi::comm_take_ownership);
#else
boost::mpi::communicator parallelCom::world_;
#endif
int pa... | DATA | 0.99149 | 3.82056 |
b3dcfa6b-3d6e-489b-9fa1-40fcbe7561d9 | ROKORORI/codetree-TILs | 240201/ab곱 n번 구하기/a-multiple-b-n-times.cpp | #include <iostream>
using namespace std;
int main() {
// 여기에 코드를 작성해주세요.
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a, b, gop = 1;
cin >> a >> b;
for (int j = a; j <= b; j++) {
gop *= j;
}
cout << gop << endl;
}
return 0;
} | ALGO | 0.999975 | 4.496696 |
267cfdc3-cf7a-455e-84f4-c62edeb96bdb | abhishek2x/CPP---Patterns | Pattern11.cpp | // PATTERN WITH ZEROS
// Take N (number of rows), print the following pattern (for N = 5)
// 1
// 2 2
// 3 0 3
// 4 0 0 4
// 5 0 0 0 5
#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++)
{
if(j =... | ALGO | 0.99965 | 5.263666 |
a26cd9b1-7611-42c7-99f1-50e0c280fbb0 | Korolev1305/polevoy_opencv | prj/idz/idz.cpp |
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main()
{
int windowSize = 2;
int imageNumber = -1;
int sigma = -1;
while(imageNumber > 2 or imageNumber < 0)
{
cout << "Введите номер изображения (1 – домик или 2 – овощи):" << endl;
cin >> imageNumber;
if (im... | ALGO | 0.995661 | 5.266401 |
b28648cd-6868-41fa-ac4e-fcd4bbd7daee | ishandutta2007/codeforces | marckess/normal/794/D.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < n; i++)
#define forr(i,a,b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb(x) push_back(x)
using namespace std;
typedef long l... | ALGO | 0.999992 | 4.277231 |
bb76e6d1-994e-49fa-a2e8-9360eb5af3ed | liraymond04/ccc-practice | 2016/s2.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
setbuf(stdout, 0);
int q;
cin >> q;
int n;
cin >> n;
vector<int> d(n), p(n);
for (int i=0; i<n; i++) {
cin >> d[i];
}
for (int i=0; i<n; i++) {
cin >> p[i];
}
sort(d.begin(), d.end());
sort(p... | ALGO | 0.999873 | 3.284153 |
6da58ffc-98d0-4f9a-84cf-dc6d8bd98477 | RinCloud/TrickCatcher | Datasets/TrickyBugs/GenProgs/tc_generated_progs_cpp/p03202/p03202_num8_parsed.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; i++) cin >> A[i];
int l = 0, r = N;
while (r-l > 1) {
int c = (l+r)/2;
map<int, int> mp;
for (int i = 1; i < N; i++) {
if ... | ALGO | 0.999967 | 4.492594 |
1a90d563-6902-48f9-95ff-dec29ec5074e | micYn/Uva-online-judge | 一星/Uva389.cpp | #include <iostream>
#include <string>
#include <iomanip>
using namespace std;
//recursive might leads to segmentation fault because of the incompleted boundary condition.
int power(int num,int pow){
if(pow==1) return num;
else if(pow==0) return 1; //Do not forget pow==0.
else return num*power(num,pow-1);
}
void reve... | ALGO | 0.97637 | 4.828639 |
4b41abb2-7c7a-4168-8435-d79f8786e29f | ravimenariya/LEETCODE_GFG_POTD | GFG_POTD/Mar 2025/15-03-2025.cpp |
// Problem -> https://www.geeksforgeeks.org/problems/number-of-coins1824/1
class Solution {
public:
int minCoins(vector<int>& coins, int target_sum) {
const int INF = 1e9; // A large value to represent impossible cases
vector<int> dp(target_sum + 1, INF);
dp[0] = 0; // Base case: 0 coins needed for... | ALGO | 0.999822 | 6.176966 |
68c4c447-17a6-438d-b9d2-8870e478e5fa | ShampaShaw/DSA | STL/pair.cpp | #include<bits/stdc++.h>
using namespace std;
void explainPair() {
pair<int, int> p={1,3};
cout << p.first << " " << p.second;
pair<int, pair<int, int>> q = {1, {3,4} };
cout << q.first << " " << q.second.second << " " << q.second.first;
pair<int, int> arr[] = { {1,2}, {3,4}, {5,6} };
cout ... | TOOL | 0.874476 | 3.728431 |
8effa6e3-8680-4af9-8daa-43f1ebfcf7ed | ishandutta2007/codeforces | maxplus/normal/1610/B.cpp | //#pragma GCC optimize "tree-vectorize"
#pragma GCC target "movbe,mmx,sse,sse2,sse3,ssse3,sse4.1,sse4.2,popcnt,avx,avx2,aes,pclmul,fsgsbase,rdrnd,fma,bmi,bmi2,f16c,rdseed,clflushopt,xsavec,xsaves,adx,prfchw,lzcnt,abm"
#include <iostream>
using namespace std;
bool online_judge =
#ifdef ONLINE_JUDGE... | ALGO | 0.999744 | 4.307652 |
29c923ab-1e7e-42fc-b15f-b1f526d0e22f | phrock/acm | topcoder/sources/RabbitVoting.cpp | #include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstr... | ALGO | 0.999729 | 4.809961 |
efaaf45a-fb0c-4ff7-8fb2-ba84d73d9da8 | daiwb/Algorithm | TopCoder/Tournaments/TCO14/R2A/SixteenBricks.cpp | // BEGIN CUT HERE
// END CUT HERE
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <string>
#include <cstring>
using namespace std;
// BEGIN CU... | ALGO | 0.995381 | 4.754769 |
12fac2a8-57aa-4bc3-9523-d6f251c3525b | ishandutta2007/codeforces | sofapuden/normal/1372/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef pair<db,db> pd;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<db> vd;
typedef vector<str> vs;
typedef... | ALGO | 0.999824 | 4.505177 |
6ecc168b-543c-44f2-b9ae-9065251527b8 | StevenWanglolz/My_Leetcode_Journey | Algorithms/C++/Sort_Array_By_Parity/My_code.cpp | class Solution {
public:
vector<int> sortArrayByParity(vector<int>& nums) {
vector<int> even;
vector<int> odd;
for(auto n: nums){
if(n % 2 == 0){
even.push_back(n);
}
else{
odd.push_back(n);
}
}
f... | ALGO | 0.999986 | 5.682289 |
13402a52-1da7-4527-8eca-b0aeac178db9 | SOHAN-MONIES/Strivers-A2Z-DSA-Course-Sheet | Basics/Lec2/2.cpp | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
// 5
// *
// * *
// * * *
// * * * *
// * * * * *
int main()
{
int n;
cin >> n;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= i; j++)
{
cout << "*" << " ";
}
cout << endl;
}
return... | ALGO | 0.999988 | 3.989969 |
747dcd74-c685-499e-84d0-ed3184109d9a | ArthurNigoyan/ProjSpaceCont | play_with_vector/main.cpp | #include <iostream>
#include <vector>
#include "odd_double.h"
int main()
{
std::vector<int> obj;
std::vector<int> obj1;
for (int i=0;i<5;i++)
{
for (int i=0;i<10;i++)
{
obj.push_back(i);
}
}
std::cout<<"before"<<std::endl;;
for (auto ir = obj.begin(); ir != obj.end(); ++ir)
std::cout << *ir <<... | TOOL | 0.863778 | 4.367026 |
ca0ff7b1-5c33-42bc-b645-7514d164f8fe | shreyanzjain/zzz | leetcode medium/merge_nodes_in_bw_zeros.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* mergeNodes(... | ALGO | 0.999835 | 5.059119 |
d203c6d1-27b9-4aab-83bc-1ff423aeba58 | xhaktmchl/Algorithm_study | BOJ/트리/인덱스 트리/[백준 2243 c++ XV] 사탕상자.cpp | #include <iostream>
#include <algorithm> // fill_n, min,max, swap
//#include <map> // 중복 x
//#include <string> // getline
//#include <cstring> // memset, strok, strstr
//#include <vector>
//#include <queue> // priority_queue<자료형, 구현체, 비교 연산자> (중복허용)
//#include <set> // 트리, 중복 x , multiset
//#include <unordered_set>
//... | ALGO | 0.99989 | 4.395575 |
bf07666d-348f-4422-8611-79ada317b0b0 | vermakriti/Leetcode | Greedy/Check If a String Can Break Another String/program.cpp | /*
Given two strings: s1 and s2 with the same size, check if some permutation of string s1 can break some permutation of string s2 or vice-versa. In other words s2 can break s1 or vice-versa.
A string x can break string y (both of size n) if x[i] >= y[i] (in alphabetical order) for all i between 0 and n-1.
Example 1... | ALGO | 0.999982 | 5.829222 |
8eebee26-821e-49d3-9135-568e738ffbe2 | yashjain0313/CP | dsa/cses/contests cf/Maximum_Distance_Permutations.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define fwd(i,a,b) for(ll i=a; i<b; i++)
#define bwd(i,a,b) for(ll i=a; i>=b; i--)
int main ()
{
int n;
vector<int>v1;
vector<int>v2;
cin>>n;
for(int i=0;i<7;i++)
{
int x;
... | ALGO | 0.999849 | 3.607319 |
bfa08f66-0838-4113-bea2-3d7de8e2e4e6 | MESMER-kinetics/MESMER-code | qd-2.2.5/tests/pslq_test.cpp | #include <cmath>
#include <iostream>
#include <ctime>
#include <limits>
#include <iomanip>
#include <qd/fpu.h>
#include "tictoc.h"
#include "pslq.h"
using std::cout;
using std::cerr;
using std::endl;
using std::strcmp;
int g_verbose = 0;
bool flag_double_pslq = false;
bool flag_dd_pslq = false;
bool flag_qd_pslq = f... | ALGO | 0.995413 | 5.212995 |
37a2eb88-14cd-413f-a2ea-01df9ebd4bfa | MortFred/LeetCodeCpp | 125_valid_palindrome.cpp | #include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>
#include <unordered_map>
#include <iomanip>
#include <chrono>
#include <unordered_set>
using namespace std;
class Solution
{
public:
bool isPalindrome(string s)
{
string res{""};
size_t start{0};
size_t end{... | ALGO | 0.997833 | 5.336213 |
5e448fb8-398f-4b20-a0e3-b9d8757dbfea | NarvisOS/system_core | base/properties.cpp | #include "android-base/properties.h"
#if defined(__BIONIC__)
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/system_properties.h>
#include <sys/_system_properties.h>
#endif
#include <algorithm>
#include <chrono>
#include <limits>
#include <map>
#include <string>
#include <android-base/parseint.h>
na... | TOOL | 0.953408 | 6.840252 |
2fe22814-c527-4e70-ba8e-74cbc1c4709a | WGQ-CN/PnC-Sim | src/navigation/costmap_2d/plugins/inflation_layer.cpp | #include <algorithm>
#include <costmap_2d/inflation_layer.h>
#include <costmap_2d/costmap_math.h>
#include <costmap_2d/footprint.h>
#include <boost/thread.hpp>
#include <pluginlib/class_list_macros.hpp>
PLUGINLIB_EXPORT_CLASS(costmap_2d::InflationLayer, costmap_2d::Layer)
using costmap_2d::LETHAL_OBSTACLE;
using cost... | TOOL | 0.946714 | 7.565972 |
078991c9-2833-4fd1-89fd-b3ff29785ca8 | YUXUANCHENG/Leetcode | 513_bottom_left/BFS.cpp | #include <vector>
#include <queue>
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), left(left), right(right) {}
... | ALGO | 0.999986 | 5.993012 |
bfd78d44-3eb9-4cda-b2af-9b3d54e26f74 | Tongyuang/EdgeTile | EdgeTileClient/deps/opencv/modules/core/src/norm.cpp | #include "precomp.hpp"
#include "opencl_kernels_core.hpp"
#include "stat.hpp"
/****************************************************************************************\
* norm *
\**********************************************************... | ALGO | 0.999447 | 4.266378 |
44b83b91-4a2d-4f77-8dfb-ab594a7a8f3f | projeshroy/lammps_ff_selector | include/Eigen_3.3.1/unsupported/doc/examples/MatrixSinh.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
int main()
{
MatrixXf A = MatrixXf::Random(3,3);
std::cout << "A = \n" << A << "\n\n";
MatrixXf sinhA = A.sinh();
std::cout << "sinh(A) = \n" << sinhA << "\n\n";
MatrixXf coshA = A.cosh();
std::cout << "cosh(A) = \n"... | ALGO | 0.994188 | 5.882721 |
a1da4bf7-6812-4d68-9c85-3b3952572e7d | lucas54neves/gcc224-ialg | Lista de conceitos básicos/Questão 18/exercicio18.cpp | #include <iostream>
using namespace std;
int main () {
float baseMenor, baseMaior, altura, area, somaBases;
cin >> baseMaior >> baseMenor >> altura;
somaBases = baseMenor + baseMaior;
area = (somaBases * altura) / 2;
cout << area << endl;
return 0;
}
| ALGO | 0.936824 | 3.843952 |
f2e7d789-b3cc-4c3f-be49-e88f1b61fe1f | aruyuna9531/cpp-game-server-example | framework/src/libs/libmath3d/triangle.cpp | #include "triangle.h"
#include "vector3.h"
Triangle::Triangle(){}
Triangle::Triangle(const Vector3& _p1,const Vector3& _p2,const Vector3& _p3): p1(_p1), p2(_p2), p3(_p3) {}
_vectorNumType Triangle::Length() {
return Mag(p3-p2) + Mag(p2-p1) + Mag(p1-p3);
}
_vectorNumType Triangle::Area() {
return (p3-p2).cros... | ALGO | 0.994451 | 5.672977 |
04745ef2-9fa6-46c8-bf15-7ca767a94fb9 | Medachii/Newtonix2000 | emptyExample/src/ofApp.cpp | #include "ofApp.h"
void ofApp::initializeParticles() {
gravite = Vecteur3D(0, -9.8, 0);
ParticleGravity* Pgravity = new ParticleGravity();
ParticleDrag* Pdrag = new ParticleDrag();
//Collisions classiques entre deux particules
//*numberOfParticles = 0;
Particule* p1 = new Particule(numberOfParticles,Vecteur3D(5... | TOOL | 0.892244 | 3.9451 |
24219353-ef30-4483-949c-500ae8c9ef67 | YvesHarrison/Leetcode | Dynamic Programming/312. Burst Balloons/solution.cpp | class Solution {
public:
int maxCoins(vector<int>& nums) {
int n=nums.size()+2;
vector<vector<int>>dp(n,vector<int>(n,0));
vector<int>num(n,1);
for(int i=0;i<n-2;++i){
num[i+1]=nums[i];
}
for(int len=2;len<n;len++){
for(int left=0;left<n-len;++... | ALGO | 0.999966 | 4.744627 |
069fa280-c7a1-4e7a-a50e-7e4f3e8d95cf | jestupinanb/Contest | Graphs/Counting Cells in a Blob.cpp | #include <iostream>
#include <bits/stdc++.h>
int main()
{
std::string pos1;
std::string pos2;
while (std::getline(std::cin,pos1,' ') && !pos1.empty() && std::getline(std::cin, pos2, '\n'))
{
bool chess[8][8];
for (int i = 0; i < 8; i++)
{
for (int j = 0; j < 8; j++)
{
chess[i][j] = 0;
}
}
... | ALGO | 0.999825 | 4.782289 |
3f4eb09c-07f1-47c3-817a-389fbd8bde89 | BaeKSorM/baekjoon | baekjoon(NotSumbitted)/1718.cpp | #include <iostream>
#include <string>
using namespace std;
int main()
{
int a = 0;
string s, c;
getline(cin, s);
cin >> c;
for (int i = 0; i < s.length(); ++i)
{
if (s[i] == ' ')
{
cout << ' ';
}
else
{
if (s[i] - (c[a] - 'a' + 1) ... | ALGO | 0.999646 | 3.588723 |
c8688b30-4237-400c-ada8-0dc1a9a72469 | chen-chaochen/losulang | release/losu1.0/losuvm_md5.cpp | #include <iostream>
using namespace std;
#ifndef BZF_MD5_H
#define BZF_MD5_H
#include <cstring>
#include <iostream>
#include <cstdio>
class MD5
{
public:
typedef unsigned int size_type; // 32λ
MD5();
MD5(const string& text);
void update(const unsigned char *buf, size_type length);
void update(const c... | ALGO | 0.997653 | 4.967935 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.