uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
028be02f-e581-4585-b3a9-9a2384504dcf | VijayKYadav/LeetCode-2025 | February/Maximum Sum With at Most K Elements.cpp | I Approach (Using MaxHeap or Priority_Queue)
class Solution {
public:
long long maxSum(vector<vector<int>>& grid, vector<int>& limits, int k) {
long long sum=0;
int n=grid.size();
for(int i=0;i<n;i++)
{
sort(grid[i].begin(),grid[i].end(),greater<int>());
}
... | ALGO | 0.999997 | 5.975279 |
a5e0b225-57bd-49af-932e-b1121462a1c3 | ishandutta2007/codeforces | bench0310/normal/1023/C.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n,k;
cin >> n >> k;
string a,b;
cin >> a;
int cnt=0;
for(int i=0;i<n;i++)
{
if(a[i]=='('&&cnt+1<=k-1)
{
b+='(';
cnt++;
k--;
}
if(a[i]==')'&&cnt>0)
{
b+=')';
... | ALGO | 0.999857 | 3.852181 |
9f0b0497-3477-4a69-8e50-539efa69de91 | DLR-SE/llvm | lld/MachO/MarkLive.cpp | #include "MarkLive.h"
#include "Config.h"
#include "OutputSegment.h"
#include "SymbolTable.h"
#include "Symbols.h"
#include "UnwindInfoSection.h"
#include "lld/Common/ErrorHandler.h"
#include "llvm/Support/TimeProfiler.h"
#include "mach-o/compact_unwind_encoding.h"
namespace lld::macho {
using namespace llvm;
using... | TOOL | 0.891948 | 7.964495 |
c8a4f925-b199-4a39-88e0-d59f7f839ef9 | oz23/kodi | lib/libUPnP/Platinum/Source/Devices/MediaServer/PltFileMediaServer.cpp | /*----------------------------------------------------------------------
| includes
+---------------------------------------------------------------------*/
#include "PltUPnP.h"
#include "PltFileMediaServer.h"
#include "PltMediaItem.h"
#include "PltService.h"
#include "PltTaskManager.h"
#include "PltHttpServer.h"
#in... | WEB | 0.873708 | 6.263493 |
c73c2bd2-2a06-4242-b237-dc6f1ef04147 | tkzzzzzz6/Algorithm_beginner_learning_notes | luogu_code/入门/P1255/1.cpp | #include <cstdio> // 引入标准输入输出库
#include <algorithm> // 引入算法库
#include <iostream> // 引入输入输出流库
#include <cstring> // 引入字符串处理库
using namespace std; // 使用标准命名空间
int n, len = 1, f[5003][5003]; // f[k][i]表示第k阶台阶所对应的走法数,len用于记录有效位数
// 高精度加法函数,k表示当前阶数
void hp(int k)
{
int i; // 循环变量
// 计算第k阶的走法数,使用前两... | ALGO | 0.999989 | 4.808919 |
808980da-ff13-4da5-9518-5b34a4148e53 | otavioolsilva/MAC0214 | Individual/Codeforces/907_div2/f_upsolving.cpp | #include <bits/stdc++.h>
using namespace std;
void dbg_out() { cerr << endl; }
template <typename H, typename... T>
void dbg_out(H h, T... t) { cerr << ' ' << h; dbg_out(t...); }
#define dbg(...) cerr << #__VA_ARGS__ << ':'; dbg_out(__VA_ARGS__);
#define ln cerr << "line:" << __LINE__ << " bao, sow" << endl
typedef ... | ALGO | 0.999708 | 4.114326 |
1a4b3278-dce4-4e02-a4c3-5d3aa28b18b8 | zhaojinm/418a4 | libigl/include/igl/boundary_loop.cpp | template <typename DerivedF, typename Index>
IGL_INLINE void igl::boundary_loop(
const Eigen::PlainObjectBase<DerivedF> & F,
std::vector<std::vector<Index> >& L)
{
using namespace std;
using namespace Eigen;
if(F.rows() == 0)
return;
VectorXd Vdummy(F.maxCoeff()+1,1);
DerivedF TT,TTi;
vector<s... | ALGO | 0.998604 | 6.131008 |
d349c97b-2096-4a28-9442-e1dbcfc0919d | sendoru/ps-cpp-new | source/atcoder/abc414_d.cpp | // #include "atcoder/all"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const ll MOD9 = 998244353;
const ll MOD1 = (ll)1e9 + 7;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(null... | ALGO | 0.999989 | 4.567902 |
ca32b806-3a8b-43d8-92a2-4ad5ede4609a | ankur-vishwakarma/DSA | Practice/code_warrior/safe_array2.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
main(){
int t;
cin>>t;
int s[t][3];
vector< vector<int> >v;
for(int i=0;i<t;i++){
vector<int> temp;
cin>>s[i][0]>>s[i][1]>>s[i][2];
for(int j=0;j<s[i][0];j++){
int k;
cin>>k;
temp.push_back(k);
}
v.push_back(temp... | ALGO | 0.999685 | 3.203973 |
04f3b787-a2bd-478a-8e6b-a41bcdf5e283 | jearmstrong21/GLMinecraft3 | lib/anl/implicitfractal.cpp | #include "implicitfractal.h"
#include <cmath>
#include <iostream>
using namespace anl;
CImplicitFractal::CImplicitFractal(unsigned int type, unsigned int basistype, unsigned int interptype)
{
setNumOctaves(8);
setFrequency(1.0);
setLacunarity(2.0);
setType(type);
setAllSourceTypes(basistype, interp... | ALGO | 0.995945 | 3.746289 |
6e2a7bf0-d066-4903-82d0-9443f6ba61f3 | saxena-vinayak36/SUPPLY-CHAIN | C++/insertion_in_BST.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node
{
int key;
Node *left, *right;
};
Node *insert_bst(Node *head, int data)
{
Node *node = new Node();
node->key = data;
node->left = NULL;
node->right = NULL;
if (head->left == head)
{
head->left = node;
return head... | ALGO | 0.999997 | 4.574499 |
3a9b4205-a41b-482c-8850-2f008c6aa98a | waingram/code-embeddings | test_data/C++/Binary-digits/binary-digits-2.cpp | #include <iostream>
#include <bitset>
void printBits(int n) { // Use int like most programming languages.
int iExp = 0; // Bit-length
while (n >> iExp) ++iExp; // Could use template <log(x)*1.44269504088896340736>
for (int at = iExp - 1; at >= 0; at-... | ALGO | 0.990921 | 5.695657 |
af237ddc-9612-4feb-bba2-18093c0993da | mihaicrisan04/comp-programming | AdventOfCode/2023/day1/day12.cpp | #include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("data.in");
ofstream fout("data.out");
int find_num(char s[], char nums[][10]) {
int min = 1e9;
int max = -1e9;
int first = -1, last = -1;
// for numbers that are represented by words
for (int i = 0; i < ... | ALGO | 0.998974 | 4.405329 |
ddcdd2b5-67ff-4c5f-b564-735ce8edf56a | raincross7/code-similarity | codes/train_code/problem434/problem434_150.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
#include <cassert>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
#d... | ALGO | 0.999949 | 4.252578 |
15040ca0-8d23-4f0b-836f-f0f5886ade32 | Anshu1Gupta/CP_-_DSA | A_Space_Navigation.cpp | #include <bits/stdc++.h> // header file includes every Standard library
using namespace std;
int main() {
// Your code here
int n;
cin>>n;
int minx=INT_MAX,miny=INT_MAX,maxx=INT_MIN,maxy=INT_MIN;
while(n--){
int x1,y1,x2,y2;
cin>>x1>>y1>>x2>>y2;
maxx=max(maxx,x1);
minx... | ALGO | 0.996634 | 3.828769 |
a027fc6d-238e-4c63-b739-45f3f5fc2d7a | tapasjain/competitive-programming | codeforces/359b.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int A[N];
int main() {
ios_base::sync_with_stdio(0);
int n, k;
cin >> n >> k;
for(int i=0; i<2*k; i++) {
if(i & 1) {
A[2*i] = 2*i+1;
A[2*i + 1] = 2*i+2;
}
else {
A[2*i] = 2*i+2;
A[2*i + 1] = 2*i+1;
}
}
for(int i=2*k; i<n... | ALGO | 0.999731 | 3.168969 |
87768b78-15a8-4c00-b750-9ae6adef806d | detaomega/NCTU_LoTaTea | codebook/Geometry/nearest Pair.cpp | pair<pos,pos> nearest_pair(vector<pos> P) {
int N = P.size();
sort(begin(P), end(P),cmp());
pair<pos,pos> ans;
double mini = INF;
multiset<pos,cmp2> st;
for (int i=0, j=0; i<N; i++) {
st.insert(P[i]);
while(P[i].x - P[j].x > mini) {
st.erase(st.find(P[j++]));
}
for (auto it=begin(st);... | ALGO | 0.999963 | 4.650514 |
7301f2e1-fc7e-45b2-a65e-c15c74c501f6 | Slimshady913/advanced | eigen-3.4.0/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp | MatrixXd A = MatrixXd::Random(6,6);
cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl;
EigenSolver<MatrixXd> es(A);
cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl;
cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl;
complex<double> l... | ALGO | 0.999156 | 3.093769 |
9153e893-94a3-47e0-a548-99c95fe3f368 | dfunke/mountains | code/filter_points.cpp | // Filters a text file of lat, lngs by a polygon specified in a KML file.
#include "easylogging++.h"
#include "filter.h"
#include "getopt_internal.h"
#include "latlng.h"
#include "util.h"
#include <fstream>
#include <string>
#include <vector>
using std::string;
using std::vector;
INITIALIZE_EASYLOGGINGPP
static vo... | TOOL | 0.950731 | 5.729753 |
1fe68da2-08aa-4315-912c-3cba0dd9f469 | thegamer1907/Code_Analysis | CodesNew/346.cpp | #include <bits/stdc++.h>
using namespace std;
#define NL '\n'
#define eps 1e-9
#define ins insert
#define pb push_back
#define mp make_pair
#define ll long long
#define sz(x) x.size()
#define pi 2.0*acos(0.0)
#define sqr(x) ((x) * 1ll * (x))
#define all(x) (x).begin(),(x).end()
#define file_in(); freopen("input.txt",... | ALGO | 0.999975 | 4.10465 |
c8d68231-db48-427f-ac28-143e7f775b36 | Shantanu-Saini/potd | september-2023/26-sept.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function template for C++
class Solution
{
public:
// arr[] : int input array of integers
// k : the quadruple sum required
vector<vector<int>> fourSum(vector<int> &arr, int target)
{
// Your cod... | ALGO | 0.99983 | 5.318769 |
fc689f49-7639-4833-95f2-e312b6fbec21 | donkeeman/Algorithm | Baekjoon_Online_Judge/04_array/06_boj_8958.cpp | #include <iostream>
#include <string>
using namespace std;
int main(){
int size, sum, n;
cin >> size;
string s;
for(int i = 0; i<size; i++){
sum = n = 0;
cin >> s;
for(int j = 0; (unsigned)j<s.size(); j++)
s[j] == 'O'?sum += ++n:n = 0;
cout << sum << endl;
... | ALGO | 0.999222 | 4.451534 |
af748865-3970-405f-b882-481b726f9744 | hanwinbi/FxxkCpp | AcceleratedC++/Chapter8/template.cpp | template <class T> T median(vector<T> v){
typedef typename vector<T>::size_type vec_sz;
vec_sz size = v.size();
if(size == 0) throw domain_error("median of empty vector");
sort(v.begin(), v.end());
vec_sz mid = size/2;
return size%2 == 0 ? (v[mid] + v[mid-1])/2 : v[mid];
} | ALGO | 0.999163 | 5.99975 |
1c615162-986e-40cf-98d5-058817adaa24 | andrewhaisley/argo-dns | message/dns_svcparam.cpp | using namespace std;
using namespace adns;
map<dns_svcparam::svcparam_type_t, string> type_to_name =
{
{ dns_svcparam::mandatory_e, "mandatory" },
{ dns_svcparam::alpn_e, "alpn" },
{ dns_svcparam::no_default_alpn_e, "no-default-alpn" },
{ dns_svcparam::port_e, "port" },
{ dns_svcparam::ipv4hint_e, ... | TOOL | 0.876646 | 6.198856 |
37cdbdc0-f7dc-4455-856a-32e9e078ecd3 | ZacharyTaylor/ICRA2015-Calibration-Code | genShrimpVel/libicp/matlab/icpMex.cpp | #include "mex.h"
#include <iostream>
#include <string.h>
#include "icpPointToPlane.h"
#include "icpPointToPoint.h"
using namespace std;
void mexFunction (int nlhs,mxArray *plhs[],int nrhs,const mxArray *prhs[]) {
// check arguments
if (nrhs!=5)
mexErrMsgTxt("5 input parameters required (M,T,Tr,inlier distan... | ALGO | 0.992113 | 6.084742 |
fafa71aa-35db-4a63-bab1-47445c3eefce | Andwerpz/Competitive-Programming-Practice | - cpp -/verseforsanta.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef array<int, 2> pii;
typedef array<ll, 2> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<ld> vd;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvl;
typedef vector... | ALGO | 0.999952 | 4.252835 |
6fc14ba8-74db-42db-9276-3772b57556bf | YashGupta018/LeetCode | LeetCode December Challenge(2022)/Determine if String Halves Are Alike.cpp | class Solution {
set<char> vwls = {'a','e','i','o','u','A','E','I','O','U'};
int sign(int val) { return (0 < val) - (val < 0); }
public:
bool halvesAreAlike(string s) {
int cnt = 0;
for (int i = 0; i < s.size(); ++i)
if (vwls.count(s[i]))
cnt += sign(s.size() ... | ALGO | 0.999649 | 6.080439 |
3a3663ed-be5f-4ca9-8f7d-bf9191535224 | A-TV/platform_frameworks_av | media/libstagefright/codecs/amrnb/dec/src/post_pro.cpp | /*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
#include "post_pro.h"
#include "typedef.h"
#include "basic_op.h"
/*----------------------------------------------------------------------------
; MACR... | ALGO | 0.989818 | 5.760083 |
0b6704fa-4fe7-4541-81a2-10f58a836b07 | brucelane/SimpleCornerDetection | blocks/aruco-1.2.5/utils/aruco_test_board_stability.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <opencv2/opencv.hpp>
#include "aruco.h"
#define TOTAL_METHODS 4
using namespace cv;
using namespace aruco;
string TheInputVideo;
string TheIntrinsicFile;
string TheBoardConfigFile;
bool The3DInfoAvailable=false;
float TheMarkerSize=-1;
MarkerDetector... | TOOL | 0.961367 | 5.225352 |
dcc06fb6-5363-4072-966c-5d83b921b4a3 | ishandutta2007/codeforces | sd0061/normal/670/E.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 500005;
char str[N];
int n , m , g;
int match[N];
int pre[N] , nxt[N];
char que[N];
int main() {
scanf("%d%d%d" , &n , &m , &g);
scanf("%s%s" , str + 1 , que);
stack<int> S;
for (int i = 1 ; i <= n ; ++ i) {
if (str[i] == '(') {
... | ALGO | 0.99999 | 3.481608 |
a831a0ed-c380-4f27-9b53-7dae0c0fb0cb | thanhtri59/DangThanhTri_monC | Chapter 5/Challenges/BT16.cpp | #include <iostream>
using namespace std;
int main() {
double lai_suat_hang_nam, so_du_dau_ky, so_du, tong_gui_them = 0, tong_rut_tien = 0, tong_lai = 0;
int so_thang_da_qua;
// Nhập thông tin từ người dùng
cout << "Nhập lãi suất hàng năm (dưới dạng phần trăm): ";
cin >> lai_suat_hang_nam;
cout... | ALGO | 0.99969 | 4.569855 |
db3a0dc7-3ff9-4bbe-8b94-76733d79fb05 | tihobg/unity3d-lect20 | Library/PackageCache/com.unity.ide.visualstudio@2.0.21/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <filesystem>
#include <windows.h>
#include <shlwapi.h>
#include <fcntl.h>
#include <io.h>
#include "BStrHolder.h"
#include "ComPtr.h"
#include "dte80a.tlh"
constexpr int RETRY_INTERVAL_MS = 150;
constexpr int TIMEOUT_MS = 10000;
// Often a DTE call m... | TOOL | 0.954081 | 6.933585 |
ff5732b4-1a2d-4263-9c45-7cd67a003326 | samoutlier/my-codes-cpp | 18_Dynamic_Programming/05_House_Robber.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
// Bottom Up Approach
int rob1(vector<int> &nums)
{
if (nums.size() == 1)
return nums[0];
int n = nums.size();
vector<int> dp(nums.size(), -1);
dp[n - 1] = nums[n - 1];
dp[n - 2] = max(nums[n - 1]... | ALGO | 0.999897 | 5.425313 |
bcf7d862-08fa-4cc1-9a62-4f6b7089f80b | TimerCosmos/test-3d | src/assets/ammo.js-main/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp | #include "btOptimizedBvh.h"
#include "btStridingMeshInterface.h"
#include "LinearMath/btAabbUtil2.h"
#include "LinearMath/btIDebugDraw.h"
btOptimizedBvh::btOptimizedBvh()
{
}
btOptimizedBvh::~btOptimizedBvh()
{
}
void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const ... | ALGO | 0.98409 | 6.574245 |
312801fe-5f63-4a19-b59c-c5519805d2ab | anishacharya/Cracking-Coding-Interviews | Leetcode/Trees_are_mirror.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:
bool is_Symmetric(TreeNode* l, TreeNode* r)
{
if(l==NULL && r==NULL)
... | ALGO | 0.999987 | 6.154938 |
91c6ec76-8d5f-4d0c-98ae-108ed8fa973f | qsnake/hermes | hermes2d/tutorial/P02-nonlinear/01-picard/tests/main.cpp | #define HERMES_REPORT_ALL
#define HERMES_REPORT_FILE "application.log"
#include "hermes2d.h"
#include "function/function.h"
using namespace RefinementSelectors;
// This test makes sure that example 15-picard works correctly.
const int P_INIT = 2; // Initial polynomial degree.
const int I... | ALGO | 0.998605 | 5.690835 |
d3116e8d-3305-4154-8a92-b6ac8ea3bf13 | ffccc/qipai-game | 系统模块/游戏组件/13.诈金花/游戏客户端/GameLogic.cpp | #include "StdAfx.h"
#include "GameLogic.h"
//////////////////////////////////////////////////////////////////////////
//˿
BYTE CGameLogic::m_cbCardListData[52]=
{
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D, // A - K
0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D, //÷ A - K
0... | TOOL | 0.907381 | 4.122365 |
ff5ab634-d71b-4e19-b0b1-55383fe02cb0 | cloudkernel-tech/ardupilot | libraries/SITL/SIM_Calibration.cpp | #include <assert.h>
#include <AP_Math/AP_Math.h>
#include "SIM_Calibration.h"
#define MAX_ANGULAR_SPEED (2 * M_PI)
#include <stdio.h>
SITL::Calibration::Calibration(const char *frame_str)
: Aircraft(frame_str)
{
mass = 1.5f;
}
void SITL::Calibration::update(const struct sitl_input &input)
{
Vector3f r... | TOOL | 0.957811 | 5.098688 |
96a772a0-82e5-436f-915b-7be14800d950 | pnnv/hyprland-dotfiles | VSCodium/User/History/-589092d7/Vm7t.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void snu() {
ll ans = 0;
ll n, H, k; cin >> n >> k >> H;
k -= 1;
for (ll i = 1; i <= n; i++) {
if(i >= H) {
ans += i; continue;
}
ll h = H - i;
if(h > (k * i - k)) continue;
ans += (((k * i) - h) / k);
}
cout <<... | ALGO | 0.999781 | 3.266076 |
227ad824-9232-4131-b6a6-047839223222 | ReiAccept/Algorithm | Contest/ICPC2021沈阳/补题/B.cpp | #include<bits/stdc++.h>
#define mkp make_pair
#define pb push_back
#define int long long
using namespace std;
int read() {
int x; scanf("%lld",&x); return x;
}
const int MAXN=1e5+3,MAXM=2e5+3;
int n,m,ans;
int a[MAXN];
int c[50][2];
bool flag;
bool vis[MAXN];
vector<pair<int,int>> G[MAXN];
void dfs(int u) {
... | ALGO | 0.999886 | 4.324526 |
462c80a4-5c5c-4de0-86a7-f6a5bdc22ae7 | profornnan/Problem-Solving | BOJ/동적 계획법/2306-유전자.cpp | #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
constexpr int MAX_L = 500;
int N;
string str;
int dp[MAX_L][MAX_L];
int main(void) {
cin.tie(nullptr)->sync_with_stdio(false);
cin >> str;
N = str.size();
for (int len = 1; len < N; ++len) {
for (int st = 0; st + len < N; ++st) {... | ALGO | 0.999308 | 5.175743 |
fd622c52-bff4-4d56-9472-60c8ba05a70b | akshaypandey28/LEETCODE-SOLUTION | 2418-minimum-sum-of-squared-difference/minimum-sum-of-squared-difference.cpp | class Solution{
public:
//dry run this code
long long minSumSquareDiff(vector<int>& arr1, vector<int>& arr2, int k1, int k2){
int n = arr1.size(), k = k1 + k2, diff=0, maxDiff=0;
unordered_map<int,int> freq;
for(int i=0; i<n; i++){
diff = abs(arr1[i] - arr2[i]);
... | ALGO | 0.999973 | 5.249612 |
6c6f390c-7b4c-4e8d-9548-f844a65b5ee5 | gasttohovo/quipariat | velit/deseruntamet.cpp | int sum = 0;
for (int i = 0; i < 10; ++i) {
sum += i + 1;
}
printf("The sum is %d\n", sum);
| ALGO | 0.988514 | 3.062769 |
59d01c0a-49d5-4a48-8db2-a090edb297e7 | eyosen/packages_modules_adb | client/usb_windows.cpp | #define TRACE_TAG USB
#include "sysdeps.h"
#include "client/usb.h"
// clang-format off
#include <winsock2.h> // winsock.h *must* be included before windows.h.
#include <windows.h>
// clang-format on
#include <usb100.h>
#include <winerror.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <algor... | TOOL | 0.856017 | 7.216371 |
7bd49eb8-d5b3-4190-a2ab-fb857dbd83c4 | pat-nel87/CppClasswork | practice/vectorcalc.cpp | // To speed up physics homework, resolves a vector to scalars
//
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
void vecScalar(double x, double y);
double xScalar;
double yScalar;
int main()
{
double mag;
double theta;
cout << "Enter magnitude: " << endl;
cin >> mag;
cout <<... | TOOL | 0.971765 | 4.124437 |
a8e32690-522e-4bfd-9c85-c6f12dc02e5e | Shanuraig/Leetcode | Easy/3375.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
int minOperations(vector<int>& nums, int k) {
int n=nums.size();
unordered_set<int> st;
for(int i=0;i<n;i++){
if(nums[i]<k){
return -1;
}
... | ALGO | 0.999926 | 5.268775 |
c5432f01-30dd-403c-a8ec-dc542e7956fd | AleandroValencia/3d-game | 3D Game/Dependencies/Bullet/include/BulletCollision/CollisionShapes/btTetrahedronShape.cpp | #include "btTetrahedronShape.h"
#include "LinearMath/btMatrix3x3.h"
btBU_Simplex1to4::btBU_Simplex1to4() : btPolyhedralConvexAabbCachingShape (),
m_numVertices(0)
{
m_shapeType = TETRAHEDRAL_SHAPE_PROXYTYPE;
}
btBU_Simplex1to4::btBU_Simplex1to4(const btVector3& pt0) : btPolyhedralConvexAabbCachingShape (),
m_numVert... | TOOL | 0.857061 | 6.498385 |
3947badc-169c-4405-9d4d-5399f377395a | Evolving-AI-Lab/innovation-engine | sferes/exp/images/x/gecco15/dl_rank_simple_images.cpp | #include "dl_images.hpp"
#include <iostream>
#include <sferes/phen/parameters.hpp>
#include <sferes/gen/evo_float.hpp>
//#include <sferes/ea/rank_simple.hpp>
#include <exp/images/ea/rank_simple.hpp>
#include <sferes/eval/eval.hpp>
#include "stat/best_fit_image.hpp"
#include "stat/stat_map_image.hpp"
#include <sferes... | DATA | 0.997754 | 4.525864 |
a47081cf-c130-475d-b07e-8d6edca00ee9 | yu-community-os/android_bionic | libc/malloc_debug/Config.cpp | #include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <sys/cdefs.h>
#include <string>
#include <vector>
#include <sys/system_properties.h>
#include <private/bionic_macros.h>
#include "Config.h"
#include "debug_log.h"
// Config constants
stati... | CONFIG | 0.919449 | 7.240911 |
e10b3b07-93ba-4615-8521-282aa8b8a518 | yuxineverforever/leetcode | 40-Array-Combination-Sum-without-replacement.cpp | /**
* Q: Given a collection of candidate numbers (candidates) and a target number (target),
* find all unique combinations in candidates where the candidate numbers sum to target.
* Each number in candidates may only be used once in the combination.
* Note: The solution set must not contain duplicate combinations.
... | ALGO | 0.999939 | 6.159422 |
ddd3fd29-3910-479d-8a9d-848d0f6484f6 | AFernandoDan/EstrD2023s1 | TP-EstrD-2023s1-Agüero-Fernando entrega final/BiBST.cpp | #include <iostream>
#include <algorithm>
#include "BiBST.h"
#include "TiposBasicos.h"
using namespace std;
//==========================================================================
// Invariante de representación
//==========================================================================
/* INV.REP.
Siendo (kx,k... | ALGO | 0.999942 | 4.989515 |
d186459c-855a-4de7-8901-7e66bf80b4bc | ivanradanov/cpucuda | llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp | #include "COFFObjcopy.h"
#include "COFFConfig.h"
#include "CommonConfig.h"
#include "Object.h"
#include "Reader.h"
#include "Writer.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/CRC.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Path.h"
#include <cassert>
namespace ... | TOOL | 0.87759 | 7.824766 |
19fd41b3-72e1-4aec-bc9d-7911ba1833e2 | sahilkhan03/CF-Solutions | codeforces/1293/A.cpp | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define fast ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define all(x) x.begin(), x.end()
#define F first
#define S second
#define pb push_back
#define pl pair<ll, ll>
#define vl vector<ll>... | ALGO | 0.999598 | 3.908159 |
51980a94-b4ca-4083-aaaf-420c324545e6 | ishandutta2007/codeforces | lackadaisical_lad/normal/1194/F.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int MOD = 1e9 + 7;
// const int MOD = 998244353;
ll binpow(ll a, ll p, int mod = MOD) {
ll res = 1;
a %= mod;
while (p) {
if (p & 1) {
(res *= a) %= mod;
}
p >>= 1;
... | ALGO | 0.999979 | 5.482227 |
d9b82c75-18b0-404d-9170-a6d490bd5634 | ixray-team/ixray-1.0-stsoc | src/xrAI/compiler_save.cpp | #include "stdafx.h"
#include "compiler.h"
#include "guid_generator.h"
IC BYTE compress(float c, int max_value)
{
int cover = iFloor(c*float(max_value)+.5f);
clamp(cover,0,max_value);
return BYTE(cover);
}
struct CNodeCompressed {
IC void compress_node(NodeCompressed& Dest, vertex& Src);
};
IC void CNodeCompresse... | ALGO | 0.982994 | 4.406307 |
985cc6ba-2aa1-40b1-b76b-f812ae60caf5 | codevoks/AZ | Number_of_Paths_in_Grid _3.cpp | #include<bits/stdc++.h>
using namespace std;
using lli = long long;
#define INF 1e18
const int mod = 1e9+7;
lli rec(lli row,lli column,lli left,lli last,lli n,lli m,lli k,vector<vector<lli>> &a,vector<vector<vector<vector<lli>>>> &dp)
{
//cout<<" row = "<<row<<" column = "<<column<<" left = "<<left<<" last = "<<la... | ALGO | 0.999973 | 4.643796 |
d9934534-27bc-42fc-b4bd-7e8e5e503b7f | ZemaToxic/AngryBirds | AngryBirds/Dependencies/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.999799 | 7.463565 |
7632b2fd-8f5a-4251-b222-82faebf16306 | algorithm006-class02/algorithm006-class02 | Week_01/G20200343030462/LeetCode_70_462.cpp | class Solution {
public:
//根据题目可以分析出这是一个求斐波那契数列的算法题,但是不一样的是我们不需要解出斐波那契数列中的每一个值,斐波那契数列的递推公式是f(n) = f(n - 1) + f(n - 2)
int climbStairs(int n) {
if( n <= 2) //n为1或n为2这两种基本情况
return n;
int iMethod1 = 1; //这个变量记录的相当于递推公式中的f(n - 2),初始化时给出的是f(1)的结果
int iMethod2 = 2; //这... | ALGO | 0.999991 | 5.604575 |
c2752ef7-2d19-4e26-9515-290c0783904d | khumsh/Baekjoon | BarkingDog/0x02/2446.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
for (int i = n; i > 0; i--)
{
for (int j = 0; j < n - i; j++) cout << " ";
for (int j = 2*i-1; j > 0; j--) cout << "*";
cout << "\n";
}
for (int i = 1; i < n; i++)
{
for (int j = 0; j ... | ALGO | 0.999915 | 3.633073 |
6ab33465-921b-462f-9225-27b2eca6fb33 | 113bommy/LogicalErrorFixCodeT5 | LogicalErrorFix_metric/CodeT5_LineNumber_cpp_gold/Problem_146_CorrectCode_705.cpp | #include <bits/stdc++.h>
using namespace std;
const int jump = 300;
const int MX = 1e5 + 5;
int p[MX], ip[MX], nxt[MX];
void overwrite(int pos, int finish, int turns) {
if (turns == 0) {
return;
}
nxt[pos] = finish;
overwrite(ip[pos], ip[finish], turns - 1);
}
void update(int pos) {
int finish = pos;
for... | ALGO | 0.999978 | 4.184114 |
039760ea-894f-4bcb-aa53-c73c22e973c8 | zll-hust/ProgrammingUpupup | Day2/N - Fractions Again/N - Fractions Again.cpp | #include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <string>
#include <set>
#include <math.h>
using namespace std;
typedef long long LL;
#define INT_MAX 0x7fffffff
#define INT_MIN 0x80000000
// #define LOCAL
int main()
{
#ifdef LOCAL
freopen("data.in", "r", std... | ALGO | 0.999556 | 3.5637 |
92639e60-7e42-4942-960b-e0e760c9b758 | 2018331109/June_2024_CodeForces | Round 956 Div1, 2/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define neg cout << -1 << endl
#define pb push_back
#define ss second
#define ff first
const int mod = 1e9 + 7;
const int N = 2e5 + 5;
const int INF = 1e18;
int md = 998244353;
voi... | ALGO | 0.999896 | 4.434688 |
e77c6a8a-282e-44f0-bacf-792d549a4edc | helmiazkia/listkuliner | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
9fe7f068-6981-442b-8d7f-aad78327c3d3 | Xornyv3/Stop-sign-AI-detection | src/edge-impulse-sdk/tensorflow/lite/micro/kernels/maximum_minimum.cpp | #include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/maximum_minimum.h"
#include "edge-impulse-sdk/tensorflow/lite/c/builtin_op_data.h"
#include "edge-impulse-sdk/tensorflow/lite/c/common.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/common.h"
#include "edge-impulse-sdk/tensorflow/lit... | ALGO | 0.998458 | 7.720886 |
4107278b-f4aa-4759-83aa-b376e4c3f9bd | debarghamitraroy/Competitive-Programming | CodeForces/1430C. Numbers on Whiteboard.cpp | #include <iostream>
#include <vector>
#include <set>
using namespace std;
void solve();
int main() {
solve();
return 0;
}
void solve() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
multiset<int> number;
for (int i = 1; i <= n; i++) {
number.insert(i... | ALGO | 0.999722 | 4.654683 |
e8cb0ded-952b-4a0a-9dc0-dff8ad0116c0 | ishandutta2007/codeforces | qpedop_muxaujlobu4/normal/1392/C.cpp | #include<iostream>
#include<vector>
#include<stack>
#include<cmath>
#include<algorithm>
#include<set>
#include<map>
#include<string>
#include<tuple>
#include<bitset>
#include<queue>
#include<random>
#define double long double
//#define int short
using namespace std;
long long gcd(long long i, long long j) {
if (j =... | ALGO | 0.999876 | 3.638719 |
9ac5964f-dd1b-4326-95c1-afd95c894dfb | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_7846_6.cpp | #include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
void __never(int a) { printf("\nOPS %d", a); }
long long n;
void sol() {
if (n % 3 != 0) {
cout << 0;
return;
}
n /= 3;
long long ans = 0;
for (long long a = 1; a * a * a <= n; a++)
if (n % a == 0) {
lon... | ALGO | 0.999919 | 3.914265 |
88b59c85-e3b6-47d7-bde5-3996e9566f0d | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_6814_19.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
long long SUM = 1, N, UM = 1e18, TUM = 1e17;
cin >> N;
for (int i = 0; i < 819; i++) {
SUM += TUM;
SUM %= N;
}
cout << (1 + (N - SUM)) << " " << (UM + (N - SUM)) << endl;
return 0;
}
| ALGO | 0.999021 | 3.488434 |
406ae7ef-4047-4431-a76a-ea606aa5e22c | SBULeeLab/node-cure-prototype | deps/icu-small/source/common/ucharstriebuilder.cpp | #include "unicode/utypes.h"
#include "unicode/ucharstrie.h"
#include "unicode/ucharstriebuilder.h"
#include "unicode/unistr.h"
#include "unicode/ustring.h"
#include "cmemory.h"
#include "uarrsort.h"
#include "uassert.h"
#include "uhash.h"
#include "ustr_imp.h"
U_NAMESPACE_BEGIN
/*
* Note: This builder implementation... | TOOL | 0.92578 | 7.370728 |
f517970b-8aa7-456a-a844-7e1d86139ed5 | sinian666/codes | cpp/chapter_stack_and_queue/deque.cpp | /**
* File: deque.cpp
* Created Time: 2022-11-25
* Author: Krahets (<EMAIL>)
*/
#include "../utils/common.hpp"
/* Driver Code */
int main() {
/* 初始化双向队列 */
deque<int> deque;
/* 元素入队 */
deque.push_back(2);
deque.push_back(5);
deque.push_back(4);
deque.push_front(3);
deque.push_fron... | TEST | 0.921174 | 5.774346 |
dce1da28-6c90-48c8-ab20-c0df888caee7 | mayank-tripathik/DSA | DP/zero_one_knapsack.cpp | #include<bits/stdc++.h>
using namespace std;
int max(int a, int b){
if(a<b)
return b;
else
return a;
}
int zero_one_knapsack(int total, vector<int> &weight, vector<int> &profit){
int col=total+1;
int row=weight.size();
int table[row][col];
for(int i=0;i<row;i++)
table[... | ALGO | 0.99998 | 4.140314 |
ca5449e9-b29e-4d2c-b9dc-189ca4610762 | leikang123/LLVM-NMX | llvm/lib/CodeGen/LiveRangeEdit.cpp | #include "llvm/CodeGen/LiveRangeEdit.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/CalcSpillWeights.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/Support/Debug.h"
#include... | TOOL | 0.969558 | 7.850304 |
1c7fe71d-d94c-4498-bc87-6c80e08157c1 | sharm294/bananagrams | src/bananagrams/node.cpp | #include "bananagrams/node.hpp"
#include <memory>
namespace bananas {
Node::Node(const std::string& word_so_far) : word_(word_so_far) {}
Node* Node::next(char c) {
auto iterator = next_.find(c);
if (iterator != next_.end()) {
return iterator->second.get();
}
return nullptr;
}
Node* Node::ad... | ALGO | 0.949323 | 6.434296 |
32ae52d5-e4f9-45a1-b0b4-3765cb237957 | bhatshrinath/diffuse_reflection_imaging | Include/3rdparty/meshoptimizer/gltf/animation.cpp | #include <algorithm>
#include <float.h>
#include <math.h>
#include <string.h>
static float getDelta(const Attr& l, const Attr& r, cgltf_animation_path_type type)
{
switch (type)
{
case cgltf_animation_path_type_translation:
return std::max(std::max(fabsf(l.f[0] - r.f[0]), fabsf(l.f[1] - r.f[1])), fabsf(l.f[2] - ... | ALGO | 0.900431 | 6.89995 |
e4f0f960-0b7e-48ee-8811-6cf0056dd212 | deepakIITJ06/DSA-revision | LIS_memoization.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define int long long
int mod = 1e9+7;
class Solution {
public:
int dp[2525];
int rec(int level,vector<int> &nums) {
if(level<0) return 0;
if(dp[level]!=-1) {
return dp[level];
... | ALGO | 0.999983 | 4.81057 |
6470ec47-c900-4e7c-a65c-49756332c0fc | chonyy/leetcode-solutions | 0567-permutation-in-string/0567-permutation-in-string.cpp | class Solution {
public:
bool checkInclusion(string s1, string s2) {
unordered_map<char, int> map1;
unordered_map<char, int> map2;
int n = s1.size();
int m = s2.size();
int i = 0, j = 0;
while(i < n) {
map1[s1[i]] ++;
i ++;
... | ALGO | 0.999908 | 6.585725 |
38efa9eb-047a-498e-910c-ebe16d56ab39 | caoahn/CodePTIT-DSA | duongdidfs2.cpp | #include<bits/stdc++.h>
using namespace std ;
int n,m,c1,c2;
vector<int> adj[1005] ;
bool visited[1005] ;
int p[1005] ;
vector<int> v1 ;
void dfs(int u) {
visited[u] = true ;
for(auto v : adj[u]) {
if(!visited[v]) {
p[v] = u ;
dfs(v);
... | ALGO | 0.999971 | 4.012434 |
c07e4cb7-58e4-47b2-9836-9e3c684e1351 | Hunterdii/GeeksforGeeks-POTD | May 2025 GFG SOLUTION/May-03.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
class Node {
public:
int val;
Node* next;
Node(int x) {
val = x;
next = NULL;
}
};
void printList(Node* node) {
while (node != NULL) {
cout << node->val << " ";
node = node->next;
}
cout... | ALGO | 0.999568 | 5.579553 |
d018f68f-a78c-491f-8a57-f3572c751fbd | balajiaj46/ecommerce_app | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
cd5893bb-f163-486d-81d2-9c098713cb0c | Abhay-140/DSA-solution-in-cpp | Array/findMinforPalindrome.cpp | /*
Q: Find minimum number of merge operations to make an array palindrome
link : https://www.geeksforgeeks.org/find-minimum-number-of-merge-operations-to-make-an-array-palindrome/
*/
class Solution
{
public:
// optimised code
int findMinOps(int arr[], int n)
{
int ans=0,l=0,r=n-1; // Init... | ALGO | 0.999985 | 5.491152 |
c4d79a02-c497-4c0e-984e-f9bac090a806 | evialbert/LeetCode | 2481-minimum-cuts-to-divide-a-circle/2481-minimum-cuts-to-divide-a-circle.cpp | class Solution
{
public:
int numberOfCuts(int n)
{
if(n==1) return 0; //edge case
return n%2==0 ? n/2 : n;
}
}; | ALGO | 0.999742 | 5.966727 |
f3ac7082-a450-4d3f-9a28-49972b4e421a | KartikWatts/CCppCodingCollection | OldCodes/TFIITB_2017/tf15/main.cpp | #include <iostream>
using namespace std;
int lcmf(int m, int n)
{
int fact,div,lcm=0;
if(m<n)
{
fact=m;
div=n;
}
else
{
fact=n;
div=m;
}
while(fact!=10000)
{
if(div%fact==0)
{
lcm=fact;
return lcm;
}
... | ALGO | 0.999166 | 3.196367 |
321837fd-9371-4b8d-92bc-c74cc687ce17 | bailuhu/Demos | OpencvDemo/OpencvDemo/Chapter 09/estimateF.cpp | #include <iostream>
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/calib3d/calib3d.hpp>
int main()
{
// Read input images
cv::Mat image1= cv::imread("../church01.jpg",0);
... | ALGO | 0.994122 | 4.449336 |
96235388-a63b-495c-b34c-1f95c06a8e16 | Sujata005/Leetcode | cpp submissions/Graph Questions/1192. Critical Connections in a Network.cpp | class Solution {
int timer=1;
private:
void dfs(int node, int parent, vector<int> &vis, vector<int> adj[], int time[], int lowTime[], vector<vector<int>> &bridges){
vis[node]=1;
time[node]=lowTime[node]=timer;
timer++;
for(auto it:adj[node]){
if(it==parent) cont... | ALGO | 0.999863 | 6.147494 |
7107fff7-0978-4aa7-a267-1b946d39da73 | iam1513/Competitive-Programming | CF Rated 1300/C010_YetAnotherProblemAboutPairsSatisfyinganInequality.cpp | #include <bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
#define vll vector<ll>
#define mll map<ll, ll>
#define sl set<ll>
#define sc set<char>
#define pb push_back
#define MOD 1000000007
#define PI 3.1415926535897932384626433832795
using namespace std;
ll gcd(ll a, ll b)
{
if (b == 0)
re... | ALGO | 0.999737 | 4.546687 |
75465963-a0e3-4262-9412-c814f8dc2e2b | justwait/PandaCore | dep/src/g3dlite/Crypto_md5.cpp | /**
@file Crypto_md5.cpp
@author Morgan McGuire, http://graphics.cs.williams.edu
Copyright 2006-2007, Morgan McGuire. All rights reserved.
@created 2006-03-28
@edited 2006-04-06
*/
#include "G3D/platform.h"
#include "G3D/Crypto.h"
#include "G3D/BinaryInput.h"
#include "G3D/BinaryOutput.h"
#include <cstring>... | ALGO | 0.920852 | 7.18831 |
fdb4b164-ca88-48ed-9ee2-65e5f8257443 | codemonster57/Leetcode_soln | My-Leetcode-Solution-In-CPP/CPP, C++ Solutions/1870. Minimum Speed to Arrive on Time.cpp | // TC - O(N*log(1e7))
// SC - O(1)
class Solution {
public:
bool check(int speed, vector<int>& dist, double hour) {
double ans = 0;
int n = dist.size();
for(int i = 0; i < n-1; i++) {
if(dist[i] % speed == 0) ans += dist[i]/speed;
else ans += (dist[i]/speed) + 1;
... | ALGO | 0.999942 | 5.564365 |
b1c96be4-0739-406b-93dd-8b80a35c47be | ishandutta2007/codeforces | fengzhengwei/normal/938/G.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
//char gc(){static char buf[1<<16],*s,*t;if(s==t){t=(s=buf)+fread(buf,1,1<<16,stdin);if(s==t)return EOF;}return *s++;}
int read()
{
char c;
int w=1;
while((c=getchar())>'9'||c<'0')if(c=='-')w=-1;
int ans=c-'0';
while((c=getchar())>='0'&&c<='9')ans=(... | ALGO | 0.999969 | 4.08044 |
69390510-43b0-4892-933e-8751dd5c0bf0 | Next-Gen-UI/Hacktober | LoveBabbar/14_DP/14_DP/31_print_longest_palindromic_substring.cpp | /*
link: https://leetcode.com/problems/longest-palindromic-substring/
link: https://practice.geeksforgeeks.org/problems/longest-palindrome-in-a-string/0
sol: https://www.geeksforgeeks.org/longest-palindrome-substring-set-1/
sol: https://www.geeksforgeeks.org/longest-palindromic-substring-set-2/
*/
//... | ALGO | 0.999864 | 6.059842 |
d4a7278a-ad3b-4e1f-9f31-1ad38d099cc3 | ringmesh/RINGMesh | third_party/geogram/src/lib/exploragram/optimal_transport/optimal_transport_on_surface.cpp | #include <exploragram/optimal_transport/optimal_transport_on_surface.h>
#include <geogram/voronoi/generic_RVD_vertex.h>
#include <geogram/voronoi/generic_RVD_polygon.h>
#include <geogram/voronoi/RVD_callback.h>
#include <geogram/basic/geometry.h>
#include <geogram/basic/geometry_nd.h>
#include <geogram/basic/stopwatch.... | ALGO | 0.999668 | 5.629129 |
fb3c385a-1452-49d3-9bd5-69fe9daddaac | ishandutta2007/codeforces | bohun/normal/547/C.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define ss(x) (int) x.size()
#define pb push_back
#define ll long long
#define cat(x) cerr << #x << " = " << x << endl
#define FOR(i, n) for(int i = 0; i < n; ++i)
using namespace std;
const int nax = 5e5 + 111;
int n, q;
int a[nax];
in... | ALGO | 0.999712 | 3.69766 |
d287321c-b18b-489c-9a16-745182a81ed5 | scientific-soft/DataReconcile | DataReconcile_Cpp/Examples/Example_03_061.cpp | #include <iostream>
#include <vector>
#include <complex>
#include <stdexcept>
#include <numeric>
#include <cmath>
#include <Eigen/Dense>
#include <unsupported/Eigen/NonLinearOptimization>
using namespace std;
using namespace Eigen;
// Function signature for the dependency model function
typedef VectorXd(*DependFunc)(... | ALGO | 0.99994 | 6.158638 |
6927c138-bd41-4deb-afa0-5d18c788c416 | ELEC2645/101 | code-style/main.cpp | #include <iostream>
//Function prototypes
bool isEven( int n ) ;
bool isPrime(int n ) ;
int main( ) {
float n;
/* prompt user to enter a number*/
std::cout<<"Please enter a number: ";
std::cin>>n;
std::cout<<"You entered " <<n<<"\n";
//check if it is even and print appropriate messag... | ALGO | 0.988156 | 4.388532 |
b16d2a42-8c43-4145-9c29-06d6411d0600 | ronsaldo/bullet-pharo | src/bullet-2.82-r2704/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp | #include "btSphereTriangleCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
#include "BulletCollision/CollisionShapes/btSphereShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "SphereTriangleDetector.h"
#include "BulletCollision/CollisionDispatch... | ALGO | 0.998131 | 6.826073 |
fde581c0-e1f6-4384-a78d-ef088ca8e0a5 | IvanDzanija/competitive_programming | Codeforces/round991/B.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define INF (int)1e9
#define all(x) (x).begin(), (x).end()
#define MOD (int)(1e9 + 7)
using ll = int64_t;
using ull = uint64_t;
using ld = long double;
using namespace __gnu_pbds;
using namespace std;
template <type... | ALGO | 0.999903 | 4.228559 |
a8719f21-220d-467d-b896-80445be11caf | Pilllico/no_mans_space | STRUCTURE/engine/ecsCpp/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp | #include "btSubSimplexConvexCast.h"
#include "BulletCollision/CollisionShapes/btConvexShape.h"
#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h"
#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
#include "btPointCollector.h"
#include "LinearMath/btTransformUtil.h"
btSubsimplexC... | ALGO | 0.998401 | 6.82154 |
99638a36-9424-435c-b06c-f184c94a7b24 | AakashRanjan001/leetcodebros | 0226-invert-binary-tree/0226-invert-binary-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.999982 | 6.436586 |
b81cc57c-8346-49ed-8e87-b4471f265a17 | petermoomaw/Xenharmonic-Keyboard | cpp/eigen/bench/sparse_randomsetter.cpp |
#define NOGMM
#define NOMTL
#include <map>
#include <ext/hash_map>
#include <google/dense_hash_map>
#include <google/sparse_hash_map>
#ifndef SIZE
#define SIZE 10000
#endif
#ifndef DENSITY
#define DENSITY 0.01
#endif
#ifndef REPEAT
#define REPEAT 1
#endif
#include "BenchSparseUtil.h"
#ifndef MINDENSITY
#define M... | TOOL | 0.934339 | 4.487392 |
a761bf62-0db6-4b1e-a1d2-360efeec79d1 | Remonhasan/codeforces | Online Judge Solves (Others)/Codeforces (combined)/A_Space_Navigation.cpp | /* Author: Remon Hasan
University of Asia Pacific
*/
#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define fRead(x) freopen(x,"r",stdin)
#define fWrite(x) freopen (x,"w",stdout)
#define ll long long
#define ull unsigned long long
#define ff firs... | ALGO | 0.999766 | 3.929355 |
e2095db6-cc3c-44db-80e2-3d5285a7f536 | idityaGE/LeetCode | 0094-binary-tree-inorder-traversal/0094-binary-tree-inorder-traversal.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.999993 | 6.710876 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.