uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
85db0a53-63ba-4c93-a22d-4e039026a352 | Farhana-Najnin/Algorithm | conceptual session/exam_special_session_week-1/non_increasing_merge_sort.cpp | //non-increasing/decreasing
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+7;
int nums[N];
void merge(int l,int r,int mid){
int left_size=mid-l+1;
int L[left_size+1];
int right_size=r-mid;
int R[right_size+1];
for(int i=l,j=0;i<=mid;i++,j++)
L[j]=nums[i];
for(int i=mid+1,j=0;i<=r;i++,j++)
R[j]=num... | ALGO | 0.999997 | 4.510055 |
2b520f55-8bf0-4163-a48f-066c346d0f7d | sajalahmed/Uva-Codes | UVA_10696 - f91/solve.cpp | #include <bits/stdc++.h>
using namespace std;
//#define LOCAL_DEFINE 1
int f19(int n){
if(n >= 101){
return n - 10;
}
return f19(f19(n + 11));
}
int main(){
#ifdef LOCAL_DEFINE
freopen("input.txt", "rt", stdin);
freopen("output.txt", "w", stdout);
#endif
int n;
while(scanf("%d", &n), (n||0... | ALGO | 0.998764 | 3.66731 |
b63aff70-2660-4a07-88eb-a0e3e4528abd | dhyanesh/randomdev | topcoder/algorithm/NumberOfDivisors.cpp | // BEGIN CUT HERE
// PROBLEM STATEMENT
// Return the smallest positive integer that has exactly k
// divisors. If this number is greater than 1018, return -1
// instead.
//
// DEFINITION
// Class:NumberOfDivisors
// Method:smallestNumber
// Parameters:int
// Returns:long long
// Method signature:long long smallestNu... | ALGO | 0.999961 | 5.111718 |
8274fcbe-2f1c-4541-be46-cf761482194b | ArchSecLab/xui | accel/src/systemc/tests/systemc/misc/sim_tests/biquad/biquad2/op_queue.cpp | /*****************************************************************************
op_queue.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/***************************************************************************... | ALGO | 0.95666 | 6.37581 |
0a04481d-826f-4458-94d1-2e2b336daf02 | Thinker-08/Striver-s-SDE-Sheet | Linked List/Remove N-th node from back of LinkedList.cpp | #include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)
#define int long long
using namespace std;
#define vi vector<int>
#define vvl vector<vector<int>>
#define vl vector<int>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define newline cout<<'\n'
struct ListNode
{
int data... | ALGO | 0.999992 | 3.356165 |
f712ce2d-16ad-4904-a8af-1d9f344750c5 | pratikdhulubulu/Cpp | arraybinarysearch.cpp | // array binary search
#include<iostream>
using namespace std;
int arrsearch(int arr[],int n,int key);
int main()
{
int n;
cout<<"enter size of array"<<endl;
cin>>n;
int arr[n];
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
int key;
cin>>key;
cout<<arrsearch(arr,n,key)<<endl;
}
int arrsearch(int arr[],int n,int k... | ALGO | 0.999771 | 5.301767 |
404e7e6d-33a7-4f24-87f7-500e129f0219 | chltam/cpp_practice | leetcode/problems/506_relative_ranks.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_map>
using namespace std;
class Solution {
public:
vector<string> findRelativeRanks(vector<int>& score) {
unordered_map<int,string> map;
vector<int> copy(score);
vector<string> ans;
sort(copy.begin(), cop... | ALGO | 0.99953 | 5.86676 |
87f88d84-a65b-4b80-a2d1-72af7ae43f30 | RANJITH08/leetcode | 2274-keep-multiplying-found-values-by-two/keep-multiplying-found-values-by-two.cpp | class Solution {
public:
int findFinalValue(vector<int>& nums, int original) {
sort(nums.begin(),nums.end());
for(int i=0; i<nums.size(); i++)
{
if(original==nums[i])
{
original=original*2;
}
}
return original;
}
}; | ALGO | 0.999947 | 5.640031 |
3fcfbfac-472b-4655-87ab-400fc6708b63 | LongLifeHwang/webserv | config/src/UtilTemplate.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* UtilTemplate.cpp :+: :+: :+: ... | TOOL | 0.921043 | 5.818879 |
0a5fb556-f1fd-493a-9f73-45c8258fc411 | c-redeker/sudoku_solver | src/solver/src/solver_simple_exclude.cpp | #include <solver_simple_exclude.hpp>
#include <free_functions_solver.hpp>
void SolverSimpleExclude::Solve(Sudoku &sudoku) {
auto empty_cells = sudoku.GetEmptyCells();
for (auto empty_cell : empty_cells) {
const auto row_index = empty_cell->GetRowIndex();
const auto numbers_in_row = sudoku.GetRo... | ALGO | 0.99751 | 5.467706 |
765457d5-d3e6-42f4-be1e-ba5b70ed11bb | spidy1080/LP5 | HPC_PR2.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <omp.h>
using namespace std;
void parallel_bubble_sort(vector<int>& arr) {
int n = arr.size();
bool swapped = true;
while (swapped) {
swapped = false;
#pragma omp parallel for shared(arr)
for (int i = 1; i < n; ++i)... | ALGO | 0.999982 | 4.897557 |
18d546ef-0432-466f-92de-8b2069efff41 | UET-2425HK2-INT2210-01/23021436_CTDL-GT | Lec10_Assignment/Part2.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
const int MAXN = 10000;
vector<int> adj[MAXN]; // Danh sách kề
int dist[MAXN]; // dist[i] là số cạnh từ X đến i
int main() {
int n, m, X, Y;
cin >> n >> m >> X >> Y;
// Nhập các cạnh
for (int i = 0; i < m; ++i) {
... | ALGO | 0.999858 | 5.172485 |
0d6a24fa-908c-4e13-8d31-7ac691b32353 | love481/Data_structure_algorithms | dynamic_programming/min_edit_distance.cpp | #include<bits/stdc++.h>
using namespace std;
int find_min_edit_distance(string first_str,string second_str)
{
int m=first_str.length(),n=second_str.length();
int dp[m+1][n+1];
for (int i=0;i<m+1;i++)
{
for (int j=0;j<n+1;j++)
{
if (i==0)dp[0][j]=j;
else if (j==0... | ALGO | 0.999994 | 5.017287 |
285ff566-ed7a-488f-bb7a-92feb6b27520 | LinPP0000/2023aaia2 | week12/week12-3.cpp | ///week12-3.cpp CXnHU
#include <stdio.h>
int isPrime(int n)
{///Ƥ㰣
for(int i=2;i<n;i++){
if(n%i==0)return 0;///
}
return 1;///\!!!g\,r!!
}
int main()
{
printf("пJ1Ӽ:");
int n;
scanf("%d",&n);
int ans = 0;
for(int i=2;i<=n;i++){///CX
if (isPrime(i)) {
printf("%... | ALGO | 0.999566 | 4.015968 |
e1fc8f03-1d31-4ff1-b742-9056788dd996 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/MixtralExpert/top0-100/shortest-common-supersequence-Solution.shortestCommonSupersequence/177767_DoS.cpp | static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out)
{
void **out = (void **)_out;
struct asn1_data *data = asn1_init(mem_ctx);
struct dsdb_openldap_dereference_result_control *control;
struct dsdb_openldap_dereference_result **r = NULL;
int i = 0;
if (!data) return false;
control = ... | TOOL | 0.992269 | 4.696492 |
9fbed1aa-7c40-4103-9f05-fea0518a5748 | shruti0503/LeetCoding- | 0198-house-robber/0198-house-robber.cpp | class Solution {
public:
int func(vector<int>& nums, int ind, int ans, vector<int>& dp){
if(ind>nums.size() || ind==nums.size())return 0;
if(dp[ind]!=-1) return dp[ind];
int take=nums[ind]+func(nums, ind+2, ans, dp);
int notTake=func(nums, ind+1, ans, dp);
dp[ind]=max(take,... | ALGO | 0.999951 | 5.584654 |
3dc02485-a265-4001-a270-b828c7e9f995 | Agentsiddharth/car---rental-system | library_stl/forward list/6.cpp | #include <iostream>
#include <forward_list>
using namespace std;
int main()
{
forward_list<int> l{10, 20, 30, 40, 50};
l.reverse();
for (auto i = l.begin(); i != l.end(); i++)
{
cout << (*i) << " ";
}
return 0;
} | TOOL | 0.994908 | 3.947815 |
6e58c929-a6a6-4a04-90a9-070fb0957741 | jjenkins2004/Mista-Tet | src/Tools.cpp | #include "tools.h"
//--------------------------------------------------------------------------
// random block bag
//--------------------------------------------------------------------------
int RandomBlock::getBlock() {
if (blocks.empty()) resetBag();
int rand = GetRandomValue(0, blocks.size()-1);
int ... | TOOL | 0.872426 | 5.733496 |
dbab2845-b107-47f5-bd64-cdc375ab16f9 | StoneColdCrazy/I3MegaS-Bigtreetech-SKR1.4-Turbo | Firmware/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp | #include "../../../inc/MarlinConfig.h"
#if ENABLED(AUTO_BED_LEVELING_UBL)
#include "../bedlevel.h"
#include "../../../module/planner.h"
#include "../../../module/stepper.h"
#include "../../../module/motion.h"
#if ENABLED(DELTA)
#include "../../../module/delta.h"
#endif
#include "../../../MarlinCore.h"
#include <m... | ALGO | 0.985183 | 7.535166 |
766ff39c-1917-433e-9ff1-95889b6bab43 | arunimaChintu/DSA_Hacktoberfest | singly_Linked_list.cpp | #include<iostream>
#include<map>
using namespace std;
class Node {
public:
int data;
Node* next;
//constructor
Node(int data) {
this -> data = data;
this -> next = NULL;
}
//destructor
~Node() {
int value = this -> data;
//memory free
if(this->... | ALGO | 0.999767 | 4.735843 |
6b39d7db-8a58-40d3-934a-82eb651c87d6 | CSdlwr/OJ | POJ/1828/12933156_TLE.cpp | #include <stdio.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;
#define MAXN 50005
struct point {
int x, y;
}pos[MAXN];
void swap(point* a, point* b);
int partition(point* po, int p, int r);
void qsort(point* po, int p, int r);
// bool cmp(point a, point b) {
// if (a.x < b.x) return true;
// ret... | ALGO | 0.99984 | 4.357501 |
723f3fd4-ba3e-4358-888f-7317bb936b9e | nath-asha/Competitive-Programming | Frac.cpp | #include <iostream>
using namespace std;
int main()
{
int n,i,sum=0,fact=1;
cout<<"Enter limit";
cin>>n;
for(i=1;i<=n;i++)
{
fact=fact*i;
s=s+fact;
cout<<i<<"! + ";
}
cout<<" = "<<sum;
return 0;
} | ALGO | 0.998457 | 3.71809 |
8a735266-fb85-45d2-92e9-b9ba5bfd4337 | adityasrathore/Codes | LeetCode/1684. Count the Number of Consistent Strings.cpp | class Solution {
public:
int countConsistentStrings(string allowed, vector<string>& words) {
bool count[26]={};
int ans=words.size();
for(int i=0;i<allowed.size();i++)
count[allowed[i]-'a']=true;
for(int i=0;i<words.size();i++)
for(int j=0;j<words[i].size();j+... | ALGO | 0.99989 | 5.620879 |
46be5f69-66f1-422d-b47b-bddd135be1de | thigiacmaytinh/TGMTcpp | lib/opencv342/contrib/sfm/src/projection.cpp | #include "precomp.hpp"
// Eigen
#include <Eigen/Core>
// OpenCV
#include <opencv2/core/eigen.hpp>
#include <opencv2/sfm/numeric.hpp>
#include <opencv2/sfm/projection.hpp>
// libmv headers
#include "libmv/multiview/projection.h"
#include <iostream>
namespace cv
{
namespace sfm
{
template<typename T>
void
homogeneo... | ALGO | 0.924207 | 6.531512 |
361b1756-def4-4842-b8bc-5655913e6e47 | Somvit09/DSA | PROBLEMS/Palindrome word check.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,i;
cout<<"enter char size"<<endl;
cin>>n;
char x[n+1];
cout<<"enter word .."<<endl;
cin>>x;
bool check = true;
for(i=0;i<n;i++){
if(x[i] != x[n-1-i]){
check = false;
break;
}
}
if(check == true){
cout<<"word is a palindrome"<<endl;
}... | ALGO | 0.999696 | 3.870751 |
ea060837-ec6a-4d31-8c8e-c129bc862c52 | adong001/C-DS-CPP | Boost库/boost_1_58_0/libs/mpi/example/global_min.cpp | // An example using Boost.MPI's all_reduce() that compute the minimum
// of each process's value and broadcast the result to all the processes.
#include <boost/mpi.hpp>
#include <iostream>
#include <cstdlib>
namespace mpi = boost::mpi;
int main(int argc, char* argv[])
{
mpi::environment env(argc, argv);
mpi::comm... | ALGO | 0.999418 | 4.349789 |
53f4c623-35d2-4954-a15e-5585aabc641b | AdityaTomar016/Questions | 2352-equal-row-and-column-pairs/2352-equal-row-and-column-pairs.cpp | class Solution {
public:
int equalPairs(vector<vector<int>>& grid) {
int n = grid.size();
int m = grid[0].size();
map<vector<int>,int>mp;
int count=0;
for(auto r: grid){
mp[r]++;
}
for(int j=0;j<m;j++){
... | ALGO | 0.999979 | 6.077168 |
60a348be-bc61-43ab-a18e-05a4cc55e43a | viewport73/view73 | View73/Bullet/BulletCollision/BroadphaseCollision/btDbvt.cpp | ///btDbvt implementation by Nathanael Presson
#include "btDbvt.h"
//
typedef btAlignedObjectArray<btDbvtNode*> tNodeArray;
typedef btAlignedObjectArray<const btDbvtNode*> tConstNodeArray;
//
struct btDbvtNodeEnumerator : btDbvt::ICollide
{
tConstNodeArray nodes;
void Process(const btDbvtNode* n) { nodes.push_bac... | ALGO | 0.989393 | 6.110973 |
0089a357-0fe3-470d-9ac9-559a13e33111 | GAURAVSVNIT/CODING-WITH-GAURAVSVNITIAN | 1.BASIC PROGRAMMING/C++/Conditionals/EvenOdd.cpp | #include<iostream>
using namespace std;
int main()
{
int x;
cout<<"Enter a number: ";
cin>>x;
if(x%2==0)
{
cout<<"The number is even";
}
else
{
cout<<"The number is odd";
}
return 0;
} | ALGO | 0.983411 | 3.104043 |
70f4f5e6-29b4-479f-9cd0-1b4755d6be99 | chowon986/Study | 프로그래머스 알고리즘/덧칠하기/덧칠하기.cpp | // 덧칠하기.cpp : https://school.programmers.co.kr/learn/courses/30/lessons/161989
#include <string>
#include <vector>
using namespace std;
int solution(int n, int m, vector<int> section)
{
int size = section.size();
vector<bool> walls;
walls.resize(n + 1, true);
int count = 0;
for (int i : section)... | ALGO | 0.999934 | 5.887356 |
dc8ffad7-268a-47e0-aae8-1981f70f026c | WJ-self/algorithm | .history/acwing/basic/basic/数据结构/3302_表达式求值_20230829115310.cpp | #include<bits/stdc++.h>
using namespace std;
// 双栈,一个操作数栈,一个运算符栈;
stack<int> num;
stack<char> op;
string func;
int res;
int main() {
cin >> func;
for(int i=0; i<func.length(); i++) {
if(func[i] == ')') {
char op_ = op.top();
op.pop();
int num1 = num.top();
... | ALGO | 0.999738 | 4.161701 |
36369c27-61ca-481a-bced-e9949d8090f0 | chosh95/STUDY | Programmers/레벨2_1.cpp | #include <string>
#include <vector>
#include <iostream>
#include <map>
using namespace std;
map<string, int> m;
vector<int> solution(int n, vector<string> words) {
vector<int> answer;
int idx = 1;
int circle = 1;
for (int i = 0; i < words.size(); i++) {
if ((i != 0 && words[i - 1][words[i - 1].size()-1] != words... | ALGO | 0.999798 | 4.795546 |
7b7a57ea-3f38-45a7-953f-a6f2b576e08c | jinsoolve/study_algorithm | BOJ/1420/1420.cpp | #include <iostream>
#include <algorithm>
#include <cmath>
#include <utility>
#include <string>
#include <cstring>
#include <vector>
#include <tuple>
#include <stack>
#include <queue>
#include <deque>
#include <list>
#include <map>
#include <unordered_map>
#include <climits>
#define INF 987654321
#define INF2 214748364... | ALGO | 0.999866 | 4.264947 |
a3047873-a5ca-4da1-9999-59d153805e84 | rahiaag/abcd | LeetCode/125-Valid-Palindrome.cpp | class Solution {
public:
bool isPalindrome(string s) {
string result="";
for (int i=0;i<s.size();i++){
if (s[i]>='A' && s[i]<='Z'){
result+=s[i]-'A'+'a';
}
else if (s[i]>='a' && s[i]<='z'){
result+=s[i];
}
e... | ALGO | 0.999445 | 6.255759 |
55925b3e-0aee-4022-9f94-0968784e2009 | lepecoder/algorithms | lcof/39.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int majorityElement(vector<int> &nums) {
/* 摩尔投票
当有一个人的票数超过所有票数的一半时
可以采用不同阵营投票人两两抵消的方式
那么如果有一个票数超过总票数的一半,他一定是最后剩下的
*/
int n = nums.size();
int num = nums[0];
int count = 1;
... | ALGO | 0.999766 | 5.232138 |
7e083ce6-12b9-4516-8a57-b5dac731ae5f | Bran-4/Programovacie-techniky | zadanie03.cpp | /*
Meno a priezvisko:
POKYNY:
(1) Implementujte funkcie tak, aby splnali popis pri ich deklaraciach.
(2) Cela implementacia musi byt v tomto jednom subore.
(3) Odovzdajte len tento zdrojovy subor (s vypracovanymi rieseniami).
(4) Program musi byt kompilovatelny.
(5) Globalne a staticke premenne su zakazane.
(6) ... | ALGO | 0.999693 | 4.284648 |
f51c0e49-8e7c-4abf-bb87-44504b6532a3 | initial-d/usaco_training | usaco_training/3.2/ratios.cpp | /*
ID: duyimin1
PROG: ratios
LANG: C++
*/
#include<iostream>
#include<algorithm>
#include<fstream>
#include<map>
#include<stdio.h>
#include<string.h>
#include<vector>
#include<queue>
#include<set>
#include<sstream>
#include<iomanip>
using namespace std;
ofstream fout ("ratios.out");
ifstream fin ("ratios.in");
int a ... | ALGO | 0.999914 | 3.767658 |
99f3110d-9c73-4c41-81cb-dc6b58b9e89b | frozenca/PPP-CPP | src/19/19-5.cpp | #include <cassert>
#include <limits>
#include <stdexcept>
#include <iostream>
struct Int {
int v;
Int(int v) : v(v) {}
Int &operator+=(const Int &rhs) {
if ((v > 0 && rhs.v > std::numeric_limits<int>::max() - v)
|| (rhs.v < 0 && v < std::numeric_limits<int>::min() - v)) {
... | ALGO | 0.870738 | 4.222763 |
123cae68-5c8b-479d-ae99-deac17d4313b | pnnv/hyprland-dotfiles | VSCodium/User/History/-73ddf9e6/aM6S.cpp | #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int32_t main() {
ios::sync_with_stdio(false); cin.tie(0);
int n; cin >> n;
vector <vector <bool>> g(n + 1, vector <bool>(n + 1, false));
auto h = g;
int m; cin >> m;
for(int i = 0; i < m; i++) {
int a, b; cin >> a >> b... | ALGO | 0.999973 | 4.274356 |
7300c144-0612-45fb-856e-8f1a5e9dc7b7 | hemoye/ACM | C_C++/杭电题目分类/大数/大阶乘.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXN = 35665;
int main(int agrc, char *agrv[])
{
#ifndef ONLINE_JUDGE
freopen("test.in", "r", stdin);
#endif
int n;
int arrAy[MAXN];
while (~scanf("%d", &n)){
memset(arrAy, 0, sizeof(arrAy));
arr... | ALGO | 0.999765 | 3.993073 |
d916b300-9a24-4873-af72-a6a50fefb3ea | NitinSemwal2605/All-DSA-Journey | Pattern/3_NumberPyramid.cpp | /*
1
12
123
1234
12345
*/
#include <iostream>
using namespace std;
int main() {
int rows;
cout << "Enter the number of rows: ";
cin >> rows;
for (int i = 1; i <= rows; i++) {
for (int j = 1; j <= i; j++) {
cout << j << " ";
}
cout << endl;
}
return 0;
} | ALGO | 0.99746 | 4.779855 |
92ad2986-7b8d-4f45-8258-44de50992172 | LuuuuuG/TarenaNotes | CODE/C++/day03/01const.cpp | #include<iostream>
using namespace std;
int main(){
int const& r = 100;
cout << &r << ' ' << r << endl;
const_cast<int&>(r) = 200;//去常类型转换
cout << &r << ' ' << r << endl;//200
int const volatile a = 300; //a为常变量
//cv限定int volatile 防止编译器优化
int* p = const_cast<int*> (&a);//去常转换
*p = 400;
cout << p << ' ' << *p ... | TOOL | 0.944823 | 3.115913 |
ee24ca6d-7903-4a31-924b-b44f33b9129d | LachezarTsK/Longest-Subarray-of-1-s-After-Deleting-One-Element | Solution.cpp |
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
//C++20: int longestSubarray(span<const int> input) const ...
int longestSubarray(const vector<int>& input) const {
int tail = 0;
int head = 0;
int numberOfZeros = 0;
int longestSubarray =... | ALGO | 0.999861 | 6.11538 |
34b57bab-d8ad-4a76-817b-92ea5fd34d4c | 0aps/Legacy-Code | C . C++/C++ (variado)/C++ Codes/Old Stuff/C ++ for dummies/Ch1. C++.cpp | //
// Program to convert temperature from Celsius degree
// units into Fahrenheit degree units:
// Fahrenheit = Celsius * (212 - 32)/100 + 32
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
// enter the temperature in Celsius
in... | TOOL | 0.963738 | 4.002127 |
07ca5fd9-a949-4958-ae20-d6bd2cdf00aa | Firoz587/XPSC-4 | week-3/day-7/Alt-Tab.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
stack<string>s;
for(int i=0;i<n;i++)
{
string s2;
cin>>s2;
s.push(s2);
}
set<string>ans;
while(!s.empty())
{
if(ans.find(s.top())==ans.end())
{
ans.insert(s.to... | ALGO | 0.999666 | 3.852233 |
9352124d-c561-4b1d-98d5-10ee3f30dc0f | jgeisler0303/ipddp_cpp | test_ipddp_ConCar.cpp | #include "ipddp_problem_ConCar.hpp"
#include "ipddp.hpp"
typedef ipddp<ProblemConCar, n_hor> sol;
void init(sol &s) {
s.get_nominal()[0].x(0)= 1.0; // [1;1;pi*3/2;0];
s.get_nominal()[0].x(1)= 1.0;
s.get_nominal()[0].x(2)= M_PI*3.0/2.0;
s.get_nominal()[0].x(3)= 0.0;
for(int i= 0;i<s.get_nominal().... | ALGO | 0.998322 | 4.298464 |
c2d2b17b-8e39-4e89-ab8b-c39018f0ea00 | andrewqt/Competitive-Programming | CodeForces/_1080_E_SonyaAndMatrixBeauty/_1080_E_SonyaAndMatrixBeauty.cpp |
// Problem : E. Sonya and Matrix Beauty
// Contest : Codeforces - Codeforces Round #524 (Div. 2)
// URL : https://codeforces.com/contest/1080/problem/E
// Memory Limit : 256 MB
// Time Limit : 1500 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
int N,... | ALGO | 0.999978 | 4.528991 |
d6f37b54-8ce1-42d7-938f-a75704d1544a | gautam324/Design-and-analysis-of-algorithms | Week 4 Codes/code1.cpp | #include <iostream>
#include <vector>
using namespace std;
long long merge(vector<int>& arr, int low, int mid, int high) {
int n1 = mid - low + 1;
int n2 = high - mid;
vector<int> left(n1), right(n2);
for (int i = 0; i < n1; ++i) {
left[i] = arr[low + i];
}
for (int j = 0; j < n2; +... | ALGO | 0.999912 | 5.604351 |
be06b9ec-8b76-449e-8d5b-2e23689b5cc9 | ishandutta2007/codeforces | rubikun/normal/1369/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define ... | ALGO | 0.999269 | 4.467186 |
ec78b059-39be-4de1-8c03-76b70530bc14 | yashtekade21/LeetCode_Solved | 100_Same_Tree.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.999973 | 6.49202 |
88a95acb-7c30-4791-9698-c06192ae21d2 | dapengchen1234/openvino_dev | src/core/src/op/maximum.cpp | #include "ngraph/op/maximum.hpp"
#include <memory>
#include "itt.hpp"
#include "ngraph/op/convert.hpp"
#include "ngraph/op/greater.hpp"
#include "ngraph/op/multiply.hpp"
#include "ngraph/runtime/host_tensor.hpp"
#include "ngraph/runtime/reference/maximum.hpp"
#include "ngraph/type/element_type.hpp"
using namespace s... | ALGO | 0.996204 | 7.161985 |
c9ce577d-b0dc-47cf-9874-3ab07e1a65d9 | Z8CWiZ3/CODE-SUBMiSSiONS | CODEFORCES/1907B.cpp | // || ------------------------------------------------- || //
// || ------ (BRAiN == DEAD) ? SLEEP : CODE! ------ || //
// || ------------------------------------------------- || //
// || --- !NOTHiNG iZ iMPOSSiBLE , KEEP TRYiNG! --- || //
// || ------------------------------------------------- || //
// || ----... | ALGO | 0.999489 | 3.758287 |
53a6c335-653e-4c0f-9bc4-2c7a163e7dc3 | Zzzode/myLeetCode | 529.扫雷游戏.cpp | /*
* @lc app=leetcode.cn id=529 lang=cpp
*
* [529] 扫雷游戏
*/
#include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
// @lc code=start
class So... | ALGO | 0.999721 | 6.385418 |
0235bb44-5afd-4e51-a79e-4379b494c0f6 | githubapitest/githubapitest | numerical-recipes-j/core/src/main/legacy/nr2/CPP_211/recipes/dfridr.cpp | #include <cmath>
#include <limits>
#include "nr.h"
using namespace std;
DP NR::dfridr(DP func(const DP), const DP x, const DP h, DP &err)
{
const int NTAB=10;
const DP CON=1.4, CON2=(CON*CON);
const DP BIG=numeric_limits<DP>::max();
const DP SAFE=2.0;
int i,j;
DP errt,fac,hh,ans;
Mat_DP a(NTAB,NTAB);
if (h ==... | ALGO | 0.999983 | 4.430789 |
05b1ab62-d0f8-4a48-89c8-d61607064bed | Jayechuang/oop2025spring_cses | repetitions.cpp | #include<iostream>
#include<string>
using namespace std;
int main(){
string dna;
cin>>dna;
int len = dna.size();
int cur = 1, maxlen = 0;
for(int i=1;i<len;i++){
if(dna[i-1] == dna[i]){
cur++;
}
else{
maxlen = max(cur, maxlen);
cur = 1;... | ALGO | 0.999915 | 3.692939 |
645bfb8d-5023-4b49-bb03-27bb7b8b8be8 | Prakhar-002/LEETCODE | 📜 Daily Challange 💡/10 October 🪔 2024/13 - 10 - 2024 --- 632. Smallest Range Covering Elements from K Lists ☃️ 🍁 🍰 🎲/🎲CPP - 632. Smallest Range Covering Elements from K Lists.cpp | //! https://github.com/Prakhar-002/LEETCODE
// Todo 💎 QUESTION NUMBER 632
//? ⌚ Time complexity ➺ O(n log k) 👉🏻 n = Total elements
//? 🧺 Space complexity ➺ O(k) 👉🏻 k = Number of Lists
#include <vector>
#include <queue>
#include <algorithm>
#include <limits>
using namespace std;
class Solution {
public:
... | ALGO | 0.999924 | 6.104914 |
a2ffcb8f-4730-48ba-9ef9-db9342551f8f | frcepeda/Contest-Archive | Codeforces/Round 382/A.cpp | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
const int maxk = 100;
ll n, f[maxk];
int main(){
cin >> n;
f[0] = 1;
f[1] = 2;
for (int i = 2; i < maxk; i++)
f[i] = f[i-1] + f[i-2];
int i;
for (i = 1; f[i] <= n; i++);
cout << i-1 << endl;
}
| ALGO | 0.99992 | 3.614675 |
e5690363-bed4-4977-81e7-a3c5f098e971 | AndreiCNitu/computer-graphics | glm/test/gtx/gtx_simd_mat4.cpp | ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 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.981763 | 6.438685 |
6b31c446-b726-411a-aca8-a62af036a120 | papilong123/LeetCode | cpp/String/804_Unique Morse Code Words.cpp | #include <vector>
#include <string>
#include <set>
using namespace std;
class Solution {
public:
int uniqueMorseRepresentations(vector<string>& words) {
vector<string> Morse_Code={".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-",... | ALGO | 0.999867 | 6.207769 |
c118c0e3-0bc3-4f49-9198-3879b15f6a64 | DfX-NYUAD/CCS17 | source/cmsat-2.9.9/cmsat/SCCFinder.cpp | #include <iostream>
#include <vector>
#include "cmsat/SolverTypes.h"
#include "cmsat/SCCFinder.h"
#include "cmsat/VarReplacer.h"
#include <iomanip>
#include "cmsat/time_mem.h"
#include "cmsat/Subsumer.h"
#include "cmsat/XorSubsumer.h"
using namespace CMSat;
SCCFinder::SCCFinder(Solver& _solver) :
solver(_solver)
... | ALGO | 0.998811 | 5.425467 |
41f096de-08e0-4636-8401-c358100dd450 | BijayanBhattarai/hippieDuckie | catkin_ws/src/isam/isamlib/SparseMatrix.cpp | /**
* @file SparseMatrix.cpp
* @brief Sparse matrix functionality for iSAM.
* @author Michael Kaess
* @version $Id: SparseMatrix.cpp 6376 2012-03-30 18:34:44Z kaess $
*
* Copyright (C) 2009-2013 Massachusetts Institute of Technology.
* Michael Kaess, Hordur Johannsson, David Rosen,
* Nicholas Carlevaris-Bianco ... | TOOL | 0.936511 | 6.740726 |
05e1a078-c1f7-43d5-892a-8707798c901f | firewood/topcoder | gcj_2012/QR_C_RecycledNumbers.cpp |
//
// Google Code Jam 2012 QR
// C. Recycled Numbers
//
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <iostream>
#include <sstream>
#include <map>
#include <vector>
using namespace std;
typedef vector<int> IntVec;
typedef map<int, int> IntMap;
// union find tree
// http://www.prefield.com/algorithm... | ALGO | 0.999323 | 4.859491 |
502feabf-05ba-4077-9ee8-50922329b5dc | tominku/CE_Practice | src/P.2.4.2.cpp | #include <armadillo>
#include <iostream>
#include <sciplot/sciplot.hpp>
using namespace arma;
using namespace std;
using namespace sciplot;
typedef std::vector<double> stdvec;
#include "util.cpp"
int main() {
double a = 5.0 * 1e-9;
int N = 50;
mat A(N-2, N-2, arma::fill::zeros);
// matrix constr... | ALGO | 0.999787 | 3.839504 |
45cab417-46ce-4f62-87f6-bc4060104ce1 | hhuangae/liggghts-src | pair_lj_cut_coul_debye.cpp | #include "math.h"
#include "stdlib.h"
#include "pair_lj_cut_coul_debye.h"
#include "atom.h"
#include "neigh_list.h"
#include "force.h"
#include "comm.h"
#include "error.h"
using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
PairLJCutCoulDebye::PairLJCutCoulDebye(LA... | ALGO | 0.999905 | 5.968291 |
3e6e9076-4e7b-4cce-b2a3-0ddd6d4bc711 | THARUN7474/DSA--FULL-in-cpp- | DSA_IN_CPP/graphs/basics things/DFS_COLOR_STACK.cpp | #include <iostream>
#include <vector>
#include <stack>
using namespace std;
class Graph {
private:
int V; // Number of vertices
vector<vector<int>> adjList;
public:
enum Color { WHITE, GRAY, BLACK };
Graph(int vertices) : V(vertices) {
adjList.resize(V);
}
void addEdge(int u, int v)... | ALGO | 0.99999 | 7.019388 |
9ea56da2-b029-414c-b1ac-b2a60b73ce13 | Tarun-yadav355/Cpp-programming-problems | tut27.cpp | // number of ones in bits:-
#include<iostream>
using namespace std;
int numberof1(int n){
int count=0;
while(n){
n = n & (n-1);
count++;
}return count;
}
int main(){
cout<<numberof1(5);
return 0;
} | ALGO | 0.999658 | 4.48898 |
70afe9dc-21c0-48b0-8793-a8a1d29ef759 | alexandraback/datacollection | solutions_2458486_0/C++/dasko/d.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#define REP(AA,BB) for(int AA=0; AA<(BB); ++AA)
#define FOR(AA,BB,CC) for(int AA=(BB); AA<(CC); ++AA)
#define FC(AA,BB) for(__typeof((AA).begin()) BB=(AA).begin(); BB!=(AA).end(); ++BB)
#define SZ(AA) ((int)((AA).size()))
#def... | ALGO | 0.99982 | 3.717718 |
6c375a83-212c-4706-b483-ea5dde557e5f | Sanket-Mathur/100-days-of-code | Medium Level Problems/Vertical Traversal of Binary Tree.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// Tree Node
struct Node
{
int data;
Node* left;
Node* right;
};
// Utility function to create a new Tree Node
Node* newNode(int val)
{
Node* temp = new Node;
temp->data = val;
temp->left = NULL;
temp->right = NULL;
... | ALGO | 0.999974 | 6.400895 |
abff6667-9c17-4a21-94eb-0c4da9738cf6 | palilo815/ps | baekjoon/1000/1089.cpp | #include <bits/stdc++.h>
#define loop(i,n) for(int i=0;i<n;++i)
using namespace std;
vector<int> invalid[5][3];
/* 고마워요 @jseo
### ..# ### ### #.# ### ### ### ### ###
#.# ..# ..# ..# #.# #.. #.. ..# #.# #.#
#.# ..# ### ### ### ### ### ..# ### ###
#.# ..# #.. ..# ..# ..# ... | ALGO | 0.999788 | 3.886395 |
fe11947b-05d5-46fb-b02b-36c1250ace42 | tfg1434/cp | Codeforces/1466DRE.cpp | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
#define ll long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define len(a) (ll)((a).size())
#define IN(A, B, C) assert(B <= A && A <= C)
template<typename A, typename... | ALGO | 0.999958 | 4.352665 |
995f3e28-9302-4fb7-b8f1-8b123d4165a2 | reddream001/program | 10.正则表达式匹配.cpp | /*
* @lc app=leetcode.cn id=10 lang=cpp
*
* [10] 正则表达式匹配
*
* https://leetcode-cn.com/problems/regular-expression-matching/description/
*
* algorithms
* Hard (31.62%)
* Likes: 2892
* Dislikes: 0
* Total Accepted: 261.6K
* Total Submissions: 827.3K
* Testcase Example: '"aa"\n"a"'
*
* 给你一个字符串 s 和一个字符... | ALGO | 0.999507 | 5.428692 |
7f7ff210-5a9f-4c71-8d44-3298583c6720 | rajveer-09/HustlerWorkspaceLeetcode | 575-distribute-candies/distribute-candies.cpp | static const auto io_sync_off = []() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
return 0;
}();
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vs = vector<string>;
using vd = vector<double>;
using si = set<int>;
using... | ALGO | 0.999936 | 5.428387 |
7005709e-3561-415b-8903-cc6d7a8eedd6 | OzzieIsaacs/winmerge-qt | ext/boost_1_70_0/libs/geometry/doc/index/src/examples/rtree/variants_map.cpp | //[rtree_variants_map
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/in... | ALGO | 0.998756 | 7.357695 |
fd818d34-383d-4d58-be6a-9d128e2c0cbf | krishjangir/TDD_Demo | 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.9988 | 6.76073 |
8059fab4-8c2b-402f-900a-d4527a4f9051 | PIFClub/FlyMew_Ardupilot | libraries/AP_RangeFinder/AP_RangeFinder_Bebop.cpp | #include <AP_HAL/AP_HAL.h>
#include <utility>
#if (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP || \
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO) && \
defined(HAVE_LIBIIO)
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#includ... | TOOL | 0.944487 | 7.282815 |
ad371421-7a81-45af-9f93-2c88063953a2 | revolucas/CoC-Xray | src/xrCDB/OPC_Matrix3x3.cpp | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Contains code for 3x3 matrices.
* \file IceMatrix3x3.cpp
* \author Pierre Terdiman
* \date April, 4, 2000
... | ALGO | 0.990421 | 6.168074 |
d3361e92-c100-437b-8591-1e4410d30538 | Hiashekiy/Target-Tracking | Fast-Planner/uav_simulator/so3_quadrotor_simulator/include/ode/libs/numeric/odeint/examples/gmpxx/lorenz_gmpxx.cpp | #include <iostream>
#include <boost/array.hpp>
#include <gmpxx.h>
#include <boost/numeric/odeint.hpp>
using namespace std;
using namespace boost::numeric::odeint;
//[ gmpxx_lorenz
typedef mpf_class value_type;
typedef boost::array< value_type , 3 > state_type;
struct lorenz
{
void operator()( const state_type ... | ALGO | 0.996364 | 6.689046 |
d4de4904-c4a3-4983-9b5c-3ab2f3264ead | raincross7/code-similarity | codes/train_code/problem132/problem132_309.cpp | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int MOD = 1000000007;
using Graph = vector<vector<int>>;
signed main() {
int N;
cin >> N;
int ans = 0;
int now = 0;
for( int i = 0; i < N; i++ ){
int A;
cin >> A;
if( A == 0 ){
ans += now/2;
now = 0;
}els... | ALGO | 0.999874 | 4.013741 |
f10c0f54-9739-498c-a9d0-9d071206f187 | CesarLoor/Proyecto_Estructura | PrimerParcial/2. Code/ListaDoble.cpp | /***********************************************************************
* Module: ListaDoble.cpp
* Author: Carlos Jaya
* Modified: miercoles, 13 de diciembre de 2023 1:32:00
* Purpose: Declaration of the class Operaciones
***********************************************************************/
#include <cmath>
... | TOOL | 0.858724 | 5.653424 |
9389d03c-147f-4f3a-ada0-a4cffe2302cc | mirzaazwad/Competitive-Programming | SolvedProblems/vjudge/A_-_A2.cpp | // In the name of Allah, The Lord of Mercy, The Giver of Mercy
// Author: Mirza Mohammad Azwad
// Institution: Islamic University of Technology
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define l... | ALGO | 0.999678 | 3.862278 |
0558b9f2-23c6-4374-aa13-a96feeb2ba4b | ks0727/AtCoder-Archive | ABC/251-300/277/d2.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
using ll = long long;
int main(){
int n,m;
cin >> n >> m;
vector<int> a(n);
rep(i,n) cin >> a[i];
ll sum = 0;
rep(i,n) sum += (ll)a[i];
sort(a.begin(),a.end());
ll ans = sum;
bool isdone = false;
... | ALGO | 0.999956 | 3.645404 |
569f518d-2fa9-489c-b9df-bbc17cc86863 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_355_11.cpp | #include <bits/stdc++.h>
struct Arrete {
int v, c;
};
struct Point {
int x, y;
double distance(Point other) const {
return sqrt((x - other.x) * (x - other.x) + (y - other.y) * (y - other.y));
}
};
const int NB_D = 4;
const int DY[] = {-1, 1, 0, 0};
const int DX[] = {0, 0, -1, 1};
int main(void) {
std::ios... | ALGO | 0.999987 | 4.376566 |
b91dd39e-5d1c-4b70-b61f-d7158fb23056 | ishandutta2007/codeforces | 666sb666/normal/688/B.cpp | #include<cstdio>
#include<cstring>
const int maxn=100001;
char s[maxn];
int main()
{
scanf("%s",s);
int len=strlen(s);
for(int i=0;i<len;i++)putchar(s[i]);
for(int i=len-1;i>=0;i--)putchar(s[i]);
putchar('\n');
return 0;
} | ALGO | 0.99979 | 3.62557 |
8f50c5af-a7de-4c49-8c2d-07c77b91f14d | Jackarain/tinyrpc | third_party/boost/libs/url/src/parse_path.cpp | #include <boost/url/detail/config.hpp>
#include <boost/url/parse_path.hpp>
#include <boost/url/error.hpp>
#include "detail/path.hpp"
#include <boost/url/grammar/parse.hpp>
#include "boost/url/rfc/detail/path_rules.hpp"
namespace boost {
namespace urls {
system::result<segments_encoded_view>
parse_path(core::string_vi... | TOOL | 0.913626 | 5.562551 |
8cfb1d89-7fb9-4bb6-b86c-350b3dd94ee1 | legendzhouqiang/teamtalk | server/src/base/log4z.cpp | #include "log4z.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <sstream>
#include <iostream>
#include <fstream>
#include <algorithm>
#ifdef WIN32
#include <io.h>
#include <shlwapi.h>
#includ... | TOOL | 0.865285 | 4.750641 |
87e90d01-dc27-4522-bf9d-fa011963784d | akiiishiii/oi_exercises | code/3461.cpp | #include <algorithm>
#include <cstdio>
#include <queue>
using namespace std;
struct node {
int x, y;
} a[100001];
int n, d, ans = 1000001;
priority_queue<int> q1;
priority_queue<int, vector<int>, greater<int>> q2;
bool sort1(node g1, node g2) { return g1.y < g2.y; }
inline int MIN(int g1, int g2) { return g1 <= g2 ... | ALGO | 0.999991 | 3.565569 |
4a435976-1001-4800-a619-50db3bf15cfc | anjali20082/DSA_LeetcodeQuestions | add-binary/add-binary.cpp | class Solution {
public:
string addBinary(string a, string b) {
int i = a.length()-1;
int j = b.length()-1;
int carry = 0; string res = "";
int sum =0;
while(i>=0 || j>=0){
sum = carry;
if(i>=0) sum += a[i--] - '0';
if(j>=0... | ALGO | 0.999974 | 6.347657 |
9f493c92-0f73-4a8b-9e56-0d25def33b6c | LittleYang0531/CQ-NOIP-2021 | CQ-0186/variance/variance.cpp | #include<bits/stdc++.h>
using namespace std;
const int M=2e5+5;
int n;
bool vis[M];
long long ans,sum,a[M],c[M],b[M];
void dfs(int x,long long sum1,long long sum2,long long sum){
if(x==n){
ans=min(ans,sum2*1ll*n-sum1*sum1);
return;
}
for(int i=1;i<n;i++){
if(vis[i]==0){
vis[i]=1;
dfs(x+1,sum1+sum+b[i],su... | ALGO | 0.999887 | 3.605152 |
c9cfadcf-d849-4d34-84f4-c7a1b80601c4 | Shivam2501/MSI-GEM5 | src/systemc/tests/systemc/misc/synth/combo/switch5/switch5.cpp | /*****************************************************************************
switch5.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/****************************************************************************... | TOOL | 0.98155 | 4.533247 |
714f2f7a-8fc6-422b-a592-8b7c499c8f36 | Kryst4lize/BTVN | ArraySuffix.cpp | #include<stack>
#include<map>
#include<queue>
#include<deque>
#include<string>
#include<iomanip>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<climits>
#include<bitset>
#include<fstream>
#include<chrono>
#include<functional>
#include<utility>
#include<limits>
#include<vector>
#include<random>
#include... | ALGO | 0.999916 | 3.085781 |
69e69827-9428-439a-930a-71b4cd95af72 | codeplaysoftware/sycl-for-cuda | llvm/tools/llvm-mc/llvm-mc.cpp | #include "Disassembler.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCP... | TOOL | 0.870021 | 7.850574 |
31e0b287-badd-44e8-9632-78d3df567dc7 | erahal/AndEngine-Template-AndroidStudio | AndEngineTemplate/andEnginePhysicsBox2DExtension/src/main/jni/Box2D/Collision/b2CollideEdge.cpp | #include "Box2D/Collision/b2Collision.h"
#include "Box2D/Collision/Shapes/b2CircleShape.h"
#include "Box2D/Collision/Shapes/b2EdgeShape.h"
#include "Box2D/Collision/Shapes/b2PolygonShape.h"
// Compute contact points for edge versus circle.
// This accounts for edge connectivity.
void b2CollideEdgeAndCircle(b2Manifold*... | ALGO | 0.999588 | 7.52148 |
2c9eb6e2-605e-4b8a-8c65-4cdef52e2e78 | mludden55/self-driving-car-engineer-nanodegree-term3 | CarND-Path-Planning-Project/src/Eigen-3.3/doc/examples/TutorialLinAlgInverseDeterminant.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
Matrix3f A;
A << 1, 2, 1,
2, 1, 0,
-1, 1, 2;
cout << "Here is the matrix A:\n" << A << endl;
cout << "The determinant of A is " << A.determinant() << endl;
cout << "The inverse of A is:\n... | ALGO | 0.99962 | 4.186114 |
26855cc9-8795-40bf-b8f7-9e080df457cb | antoinerichez/progHELHA | 2eme/Programmation/Codes/C++/teacher code/9. friends/05-class.cpp | #include <iostream>
using namespace std;
class B;
class A
{
int _i;
public:
A(int i) : _i(i) {}
int i() const {
C c;
c.m();
return _i; }
int bJ(B& b) const;
friend class B;
};
class B
{
A a;
int _j;
public:
B(A a, int j) : a(a), _j(j) {}
int brol() const { return a._i * _j; }
fri... | ALGO | 0.976969 | 4.439971 |
4a93972d-0f7a-442f-abb1-0c7d22cde041 | jgreever/cs162 | Prog5/list.cpp | /* functions.cpp
*
* Justin Greever
* CS162
* Program 5
* 3/7/2020
*
* This program will use linear linked lists to
* store data about 3 items: Name of my favorite thing,
* description of the item, and how often I participate
* with the item. It will store to a new LLL, display
* contents of all items in the... | TOOL | 0.992657 | 5.229783 |
b91799e0-ce08-4c34-91c9-6c806a7b2111 | dmachaj/AdventOfCode | 2020/Day24/main.cpp | #include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "HelpfulInfrastructure.h"
using namespace std; // I wouldn't normally do this
usi... | ALGO | 0.997396 | 6.274066 |
ee75e15d-b185-4990-83bb-bdd9e4c3f0ff | ForestMS1/codetree-TILs | 231224/문자열 순서 바꾸기/change-order-of-strings.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
// 여기에 코드를 작성해주세요.
string s;
string t;
cin >> s >> t;
cout << t << '\n' << s;
return 0;
} | ALGO | 0.9997 | 4.26186 |
e59b1747-74c7-42ad-b5a3-cea2addec121 | MishkatIT/codeforces-atcoder-submissions | codeforces/1728/1728B Best Permutation.cpp | /*
author : MishkatIT
created : Friday 2022-12-02-02.48.01
problem : 1728 B. Best Permutation
*/
#include<bits/stdc++.h>
#define fio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
int main()
{
fio;
int t;
cin >> t;
while(t--)
{
int n;
cin... | ALGO | 0.999869 | 4.576385 |
b800a629-8824-49b0-a7a5-731bf0905f48 | nhandzai/Binary_search_tree | easy/lowestCommonAncestor.cpp | #include <iostream>
using namespace std;
struct Node
{
int data;
Node *left;
Node *right;
Node(int input, Node *n = NULL)
{
this->data = input;
this->left = this->right = n;
}
};
struct Tree
{
Node *root;
Tree(Node *a = NULL)
{
this->root = a;
}
};
int get... | ALGO | 0.999988 | 3.924339 |
8de31600-2949-4bfb-b82d-60f585435797 | vinayaknikam2001/SDE-Sheet | Dynamic Programming/Part-1/3 Longest Common Subsequence.cpp | //https://www.codingninjas.com/codestudio/problems/624879?topList=striver-sde-sheet-problems&utm_source=striver&utm_medium=website
//Self Solved
#include <bits/stdc++.h>
using namespace std;
int func(int i1, int i2, string &s1, string &s2, vector<vector<int>> &dp)
{
if(i1<0 || i2<0)
return 0;
if(dp[i1]... | ALGO | 0.999986 | 6.16121 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.