uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
35e8f9ea-6ad7-4823-a1b9-b312232c0515 | VTzy137/Hust-problem | Project I/Week 1/W1_countWord.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int count = 0;
string s;
while(cin >> s)
++count;
cout << count;
return 0;
}
| ALGO | 0.980668 | 3.126246 |
2ed96836-ada5-4e4b-b11b-de32b557f135 | abhijeet-anshu/Codechef-Sols | june14/FORGETPW.cpp | #include <bits/stdc++.h>
char str[1000002], word[4],c,d;
char rule[127];
int main(void){
int n,t,l,i,a,b;
int dotCount;
scanf("%d",&t);
while(t--) {
dotCount=0;
scanf("%d",&n);
for(i=33;i<127;i++)
rule[i]=0;
for(i=0;i<n;i++){
scanf(" %c %c",&c,&d);
assert(c<127 && c>32);
assert(d>3... | ALGO | 0.999865 | 3.681941 |
686f35cb-f128-40a4-b256-19a755a12ebd | Deepak22903/PP | Trees/maxDepth.cpp | #include <iostream>
using namespace std;
/**
* Definition for a binary tree node.
*/
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *right... | ALGO | 0.99996 | 7.309886 |
fbe16681-f9f9-45e6-a384-0f205ced5b6f | Debashis7307/CPP | 11_Math/LeetCode_2483.cpp | #include <vector>
#include <string>
#include <algorithm>
#include <iostream>
using namespace std;
int bestClosingTime(string customers) {
int n = customers.size();
vector<int> pre(n + 1, 0); // Prefix penalties (penalty for 'N')
vector<int> suf(n + 1, 0); // Suffix penalties (penalty for 'Y')
// Comp... | ALGO | 0.999511 | 6.699515 |
5d3f81d3-9110-4a31-993f-3883c7875583 | Raj91027/160DaysOfCoding | Array/Day1-SecondLargestNumber.cpp | /*
Given an array of positive integers arr[], return the second largest element from the array. If the second largest element doesn't exist then return -1.
Note: The second largest element should not be equal to the largest element.
Examples:
Input: arr[] = [12, 35, 1, 10, 34, 1]
Output: 34
Explanation: The largest e... | ALGO | 0.999981 | 5.537865 |
9ab3cecc-54d0-4d8c-a7f9-934327077df9 | ascyrax/cp_dsa | codeforces/rated/div3/601-900/734/c/expert.cpp | // #include <bits/stdc++.h>
// using namespace std;
// typedef long long ll;
// typedef long double ld;
// #define endl "\n"
// #define ioss \
// ios::sync_with_stdio(false); \
// cin.tie(0);
// #define pb push_back
// double startTime;
// double gct() //get_current_time
// {
... | ALGO | 0.99998 | 4.031577 |
4e03af7b-4002-47ac-9001-34f946152d85 | rfabbri/Gem | src/Pixes/pix_kaleidoscope.cpp | #include "Utils/PixPete.h"
#include "pix_kaleidoscope.h"
static double deg2rad=atan2(1.,1.)/45.0;
CPPEXTERN_NEW(pix_kaleidoscope);
/////////////////////////////////////////////////////////
//
// pix_kaleidoscope
//
/////////////////////////////////////////////////////////
// Constructor
//
//////////////////////////... | ALGO | 0.862376 | 5.344713 |
0063b3d6-d8d5-46c9-8620-d3b678a7ceb9 | Nayan-Malviya/CrackYourPlacement | 11-container-with-most-water/container-with-most-water.cpp | class Solution {
public:
int maxArea(vector<int>& height) {
int left = 0;
int right = height.size() - 1;
int maxArea = 0;
while (left < right) {
int currentArea = min(height[left], height[right]) * (right - left);
maxArea = max(maxArea, currentArea);
... | ALGO | 0.999968 | 7.04757 |
f4c8d435-b075-4f79-b980-a4e4be8142c1 | TanRai/Online_Judge_Solves | Leetcode/707. Design Linked List.cpp | struct Node {
int val;
Node *next;
Node(int v) : val(v), next(nullptr) {}
Node() : val(0), next(nullptr) {}
Node(int v, Node *next) : val(v), next(next) {}
};
class MyLinkedList {
private:
int length = 0;
Node *head;
Node *tail;
public:
MyLinkedList() {
}
int get(int index) {
if(length<index+1)
return -1... | ALGO | 0.999927 | 5.175424 |
55ee6ea7-ccdc-4a94-b518-828f21041a64 | TateRCXVII/ChessTeachingApp | Chess/Box2D/Dynamics/b2World.cpp | #include <Box2D/Dynamics/b2World.h>
#include <Box2D/Dynamics/b2Body.h>
#include <Box2D/Dynamics/b2Fixture.h>
#include <Box2D/Dynamics/b2Island.h>
#include <Box2D/Dynamics/Joints/b2PulleyJoint.h>
#include <Box2D/Dynamics/Contacts/b2Contact.h>
#include <Box2D/Dynamics/Contacts/b2ContactSolver.h>
#include <Box2D/Collision... | ALGO | 0.923398 | 3.623568 |
5c1930ff-7f80-4952-a82a-f4b046d93c4a | alanross/AlvaAR | src/libs/opencv/samples/cpp/tutorial_code/snippets/core_various.cpp | #include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/features2d.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main()
{
//! [Algorithm]
Ptr<Feature2D> sbd = SimpleBlobDetector::create();
FileStorage fs_read("SimpleBlobDetector_p... | ALGO | 0.957315 | 6.612176 |
b94f7433-f11d-4585-a7c3-f305a18253f7 | evanfebrianto/Udacity-PathPlanning | src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
Eigen::MatrixXf m(2,4);
Eigen::VectorXf v(2);
m << 1, 23, 6, 9,
3, 11, 7, 2;
v << 2,
3;
MatrixXf::Index index;
// find nearest neighbour
(m.colwise() - v).colwise().squaredNorm()... | ALGO | 0.999885 | 4.120129 |
45419500-97b7-4e9a-ad66-a9e47d72e320 | DianRH/C-programs | 8_seleccionMultipleSwitch.cpp | #include <stdio.h>
#include <string.h>
main(){
int nroDia;
char dia [10];
printf("Ingrese dia de la semana: ");
scanf("%d",&nroDia);
switch(nroDia){
case 1:
strcpy(dia,"Lunes");
break;
case 2:
strcpy(dia,"Martes");
break;
case 3:
strcpy(dia,"Miercoles");
break;
case 4:
strcpy... | ALGO | 0.994795 | 3.178057 |
108bffa5-d45b-46bb-8ca6-cb66d63e72e5 | Sylar009/Scaler-Academy-Modules | Advanced DSA 2/Advanced DSA - Strings Patern Matching 1- Rabin Karp/Homework/Q1. Replicating Substring.cpp | /*
Problem Description
Given a string B, find if it is possible to re-order the characters of the string B so that it can be represented as a concatenation of A similar strings.
Eg: B = aabb and A = 2, then it is possible to re-arrange the string as "abab" which is a concatenation of 2 similar strings "ab".
If it is... | ALGO | 0.99995 | 5.025424 |
e8e7fa30-982e-45c0-8b36-bfb37e07c1dc | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_4751_0.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 1, mod = 1e9 + 7;
int a[N];
signed main() {
int n, m, k, t, ans = 0;
cin >> n >> m >> k;
for (int i = 0; i < n; i++) {
cin >> t;
t--;
a[t] = 1;
}
int c = 0;
for (int i = 0; i < 10; i++) {
c += a[i];
if (i >= m) c -= a[i - ... | ALGO | 0.999982 | 3.900387 |
a7f35415-1d0b-48af-b25f-3f4863a3014c | soulsystem00/bj_2798 | bj_2798/bj_1260.cpp | //#include <iostream>
//#include <algorithm>
//#include <queue>
//using namespace std;
//
//int DFS_visit[1001];
//int BFS_visit[1001];
//
//int arr[1001][1001];
//
//void DFS(int cur, int n)
//{
// DFS_visit[cur] = true;
// cout << cur << " ";
// for (int i = 1; i <= n; i++)
// {
// if (!DFS_visit[i] && arr[cur][i] =... | ALGO | 0.99999 | 3.864512 |
f9bfbeb1-f208-44e4-b16e-4fbb79563df0 | flinnthebin/codeforces | dev/george_and_accomodation/george_and_accomodation.cpp | #include <bits/stdc++.h>
auto main() -> int {
int n; int p; int q; std::vector<std::pair<int, int>> rooms;
std::cin >> n;
while (std::cin >> p >> q) {
auto pair = std::make_pair(p, q);
rooms.push_back(pair);
}
int count = 0;
for (auto& r : rooms) {
if (r.second - r.first >= 2) {
count++;
... | ALGO | 0.998465 | 4.658577 |
f3704977-7565-4b5e-bf3b-6a56a6b02920 | Mulab11/cntt2016-hw1 | TC-SRM-576-div1-576/immortalCO/TheExperiment.cpp | #include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef long double ld;
const int mod = 1e9 + 9;
int sum[310];
int f[310][310][3];
class TheExperiment
{
public:
int countPlacements(vector<string> inp, int M, int len, int l, int r... | ALGO | 0.999729 | 3.896353 |
cffdbf32-f1d6-479a-a47d-edbdc27e1b5c | Arjav96/My-Spoj-Solutions | FINDPRM.cpp | #include <bits/stdc++.h>
using namespace std;
bool primes[10000009];
int cum[10000009];
void pre(){
for(int i = 3 ; i<= 3163 ; i+=2){
if(!primes[i]){
for(int j = i*i ; j<= 10000000 ; j+=2*i)
primes[j] = 1;
}
}
cum[2] = 1;
for(int i = 3 ; i<=10000000 ; i++){
... | ALGO | 0.999594 | 3.950307 |
6ad0655a-4722-4b5a-9ddd-e122eaa6924f | etnrlz/rtbkit-deps | boost_1_57_0/libs/graph_parallel/test/distributed_rmat_cc.cpp | // Authors: Brian Barrett
// Nick Edmonds
// Andrew Lumsdaine
#include <boost/graph/use_mpi.hpp>
#include <boost/config.hpp>
#include <boost/throw_exception.hpp>
#include <boost/graph/distributed/adjacency_list.hpp>
#include <boost/property_map/parallel/distributed_property_map.hpp>
#include <boos... | ALGO | 0.887279 | 6.303998 |
abf7e866-31a1-4d92-a7ac-b4bc58e48a08 | chatterboy/ps | boj/1254/1254.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int INF = 1e9;
int N;
char s[1010];
int cache[1010][1010][2];
int shortestLength(int i, int j, int flag) {
if (i >= j) return i == j ? 1 : 0;
int &ret = cache[i][j][flag];
if (ret != -1) return ret;
ret = INF;
if (!flag) ret = ... | ALGO | 0.999924 | 3.523963 |
979ea69c-0627-42db-8c57-6087dc673724 | fang0jun/myLeetCode | 024.无重叠区间/solutionA.cpp | class Solution {
public:
static bool order(vector<int> &a, vector<int> &b){ // sort自定义排序函数 语法上的两个tip:1,必须加static; 2,参数最后加引用&,否则数据大拷贝易超时
return a[1] < b[1];
}
int eraseOverlapIntervals(vector<vector<int>>& intervals) {
sort(intervals.begin(), intervals.end(), order);
int res = 0; i... | ALGO | 0.99988 | 5.948721 |
9230aa99-68f9-4f92-bf43-d122a8bd0c77 | juxiangwu/image-processing | cpp-projects/tiny-apps/fuzzy-c-means/main.cpp |
#include "fuzzy_clustering.hpp"
#include <opencv/cxcore.h>
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <time.h>
#include <sstream>
//#include <glog/logging.h>
#include <opencv2/core/core.hpp>
int main (int argc, char **argv) {
// google::InitGoogleLogging (argv[0]);
// goo... | ALGO | 0.995552 | 3.122311 |
208797ba-1add-49c5-82fe-fb83ff140613 | brunocmo/URI | Iniciante/1061.cpp | #include <stdio.h>
int main() {
int inicialDia{0};
int inicialHora{0};
int inicialMinuto{0};
int inicialSegundo{0};
int finalDia{0};
int finalHora{0};
int finalMinuto{0};
int finalSegundo{0};
scanf("Dia %d\n",&inicialDia);
scanf("%d : %d : %d\n", &inicialHora, &inicialMinuto, &inicialSegundo);
scanf("Di... | ALGO | 0.999456 | 3.712327 |
9386c1f9-544c-40c8-95ee-c61ef1450547 | kalpitborkar/LeetCode | longest-increasing-subsequence/Accepted/3-28-2022, 8_05_01 PM/Solution.cpp | // https://leetcode.com/problems/longest-increasing-subsequence
class Solution {
public:
int lengthOfLIS(vector<int>& nums) {
int n = nums.size();
std::vector<int> dp(n,1);
for(int i = 0; i < n; i++)
{
for(int j = 0; j < i; j++)
{
if(... | ALGO | 0.999966 | 6.247203 |
66ca76fc-d517-4453-ad28-eaf4b01d728c | 23520761/NMLT_DeQuy | Bai179/Bai179.cpp | #include <iostream>
#include <iomanip>
using namespace std;
void NhapMang(int[], int&);
void DichPhai(int[], int);
void XuatMang(int[], int);
int main()
{
int n;
int a[500];
NhapMang(a, n);
cout << "\nMang ban dau: " << endl;
XuatMang(a, n);
DichPhai(a, n);
cout << "\nMang sau khi sap xep dich phai xoay vong: ... | ALGO | 0.999659 | 3.943677 |
033d9a60-c659-45c5-9b26-1a37d67a0941 | binhho2607/codeforces | icpc2015/Bet.cpp | #define imax INT_MAX
#define imin INT_MIN
#define sz(x) (int((x).size()))
#define ll long long
#define pb push_back
#define mk make_pair
#define pii pair<int, int>
#define a first
#define b second
#define vi vector<int>
#define over(x) (x).begin(), (x).end()
#define umap unordered_map
#define uset unordered_set
#define... | ALGO | 0.999349 | 3.738485 |
69380e51-2bb5-4963-95df-d70b78046436 | reddcoin-project/reddcoin | src/support/lockedpool.cpp | #include <support/lockedpool.h>
#include <support/cleanse.h>
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#ifdef WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#else
#include <sys/mman.h> // for mmap
#include <sys/resource.h> // for getrlimit
#include <limits.h> // for PAG... | TOOL | 0.863411 | 7.487549 |
b31900f8-da34-4036-b9f2-87df7bc2345e | sunriverhzy/leetcode | Leetcode_ALL/leetcode_279/完全平方数.cpp | #include <iostream>
#include <string>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <set>
#include <string.h>
#include <numeric>
using namespace std;
int numSquares(int n)
{
vector<int> dp(n + 1, 10000);
dp[0] = 0;
for (int i = 0; i*i <= n; i ++ )
{
int num ... | ALGO | 0.999583 | 4.238942 |
c82abee7-e06f-4d61-95ba-23e20bd0b57b | pavel-ryzhov/global_vars | runs/008171.cpp | /*
* File: tree_main.cpp
* Author: NesoK
*
* Created on 22 Сентябрь 2011 г., 19:23
*/
typedef struct _node node;
typedef struct _branch{
unsigned short int length;
unsigned short int number;
node *node1;
node *node2;
} branch;
typedef struct _node{
unsigned short int number;
unsigned ... | ALGO | 0.999854 | 4.217727 |
3fcafc87-5ce4-4ce3-afa2-152c87e66b87 | sarvex/leetcode-mini-kanren | lcp/LCP 17. 速算机器人/Solution.cpp | class Solution {
public:
int calculate(string s) {
int x = 1, y = 0;
for (char& c : s) {
if (c == 'A')
x = x * 2 + y;
else
y = y * 2 + x;
}
return x + y;
}
}; | ALGO | 0.999701 | 5.488472 |
1a8bb323-0b1a-45e1-a57a-0dfb296c63da | ishandutta2007/codeforces | staniewzki/normal/1109/A.cpp | #include<bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define REP(i, a) FOR(i, 0, a - 1)
#define ST first
#define ND second
#define V vector
#define RS resize
#define EB emplace_back
#define ALL(a) a.begin(), a.end()
#define S(a) (int)a.size()
template<class T> void db(T a) { ce... | ALGO | 0.999993 | 4.065891 |
7bae6121-c90b-4d04-b2dc-31a14cd8142e | callummarshall9/LBM_3D_SCFT | SCFT/qPropagator.cpp | //
// Created by callummarshall on 25/11/2019.
//
#include "qPropagator.hpp"
qPropagator::qPropagator(int nx, int ny, int nz, std::string velocity_set, double c_s, std::string boundary_condition,
double gamma_dot, double N, int N_s, double box_length_rg, field_types field_type, double f, double chiN,
... | ALGO | 0.984209 | 3.959157 |
80931909-67a3-4505-88f4-95f3be188d6b | 423april/Connect4 | 이수민/newAlphaBeta.cpp | #include <iostream>
#include "AlphaBeta.h"
#include "TreeNodes.h"
#include "ConnectFourBoard.h"
using namespace std;
//기능이 없는 생성자-독고준석-
alphabeta::alphabeta(){
eval_choice = ' ';
}
//플레이어를 바꿔주기 위한 함수이다. X이면 O로, O면 X로.-이수민-
char alphabeta::ReversePlayer(char player){
if(player == 'X')
return 'O';
... | ALGO | 0.993185 | 3.909619 |
be098774-0118-4189-9b10-7e5a6dd310e6 | ishandutta2007/codeforces | adamant/normal/1416/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define int int64_t
void solve() {
int n;
cin >> n;
int a[n + 1];
int sum = 0;
for(int i = 1; i <= n; i++) {
cin >> a[i];
sum += a[i];
}
if(sum % n != 0) {
cout << -1 << "\n";
} else {
int each = sum / n;
... | ALGO | 0.998664 | 3.511741 |
c9846086-9f35-4f9c-822e-0b0ba861604c | NavdeepKaurRupaul/IP-DSA | 10 DP/Binary tree of height.cpp | int binaryTreesOfHeight(int h){
init *a=new int[h+1];
if(h==0){
return 1;
}
if(h==1){
return 1;
}
a[0]=1;
a[1]=1;
int mod=(int)(pow(10,9))+7;
for(int i=2;i<=h;i++){
long temp=(long)(a[i-1])*a[i-1];
temp=temp%mod;
long temp1=2*(long)(a[i-1])*a[i-2];
temp1=temp1%mod;
a[i]=(temp+temp1)%mod:
}
int ... | ALGO | 0.999968 | 3.728345 |
e5474d51-28eb-4304-bf60-430ddfb12668 | Junseung0526/MY_CLASS | CPP_CLASS/3WEEK_2025_04_01/07.cpp | #include <iostream>
using namespace std;
int main() {
int hours;
cout << "Enter hours: ";
cin >> hours;
int day = (hours / 24) % 7;
int last_hour = hours % 24;
cout << "Day: " << day << " and " << "Hour: " << last_hour << endl;
return 0;
} | ALGO | 0.975585 | 4.096386 |
4910a38b-72ad-4695-9b36-190627613f6d | 0rfn0blitr8r/LC-DP | longest-palindromic-substring.cpp | #include <bits/stdc++.h>
using namespace std;
#define nl endl
#define pb push_back
class Solution {
public:
void fn(string s, int i, int j, int& maxS, int& maxL){
while(i >= 0 && j < s.length() && s[i] == s[j]){
i--;
j++;
}
if(j-i-1 > maxL){
maxS = i+1;
... | ALGO | 0.999932 | 5.790184 |
5ffff6b8-c019-4294-8bb3-9cc0bf3c86e7 | Piyush13-ambure/DSA | Count Number of Bad Pairs.cpp | /*You are given a 0-indexed integer array nums. A pair of indices (i, j) is a bad pair if i < j and j - i != nums[j] - nums[i].
Return the total number of bad pairs in nums.*/
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
long long countBadPairs(vector<int>& nums) {
long long n =... | ALGO | 0.999943 | 5.790261 |
1a68e117-de5e-4e33-a4a2-5c40a60460bc | NotAPenguin0/SaturnEngine | src/codegen/main.cpp | #include <thread>
#include <iostream>
#include <sstream>
#include <atomic>
#include <condition_variable>
#include <saturn/codegen/category_generator.hpp>
#include <saturn/codegen/serialization_generator.hpp>
#include <saturn/codegen/argument_parser.hpp>
#include <saturn/codegen/file_parser.hpp>
#include <saturn/codege... | TOOL | 0.919836 | 5.897056 |
a64313e9-d9b5-4624-b0ac-c6ae0e34b6a5 | KMZeeee/mobile-programming | Simple note and task app/to_do/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.998542 | 6.772262 |
cb964bf4-f931-4677-b2e7-5122a18974d9 | palilo815/ps | baekjoon/9000/9296.cpp | #include <iostream>
using namespace std;
int main()
{
cin.tie(NULL);
ios::sync_with_stdio(false);
int t, n;
string s1, s2;
cin >> t;
for (int i = 1; i <= t; ++i) {
cin >> n >> s1 >> s2;
int cnt = 0;
for (int j = 0; j < n; ++j)
if (s1[j] != s2[j]) ++cnt;
... | ALGO | 0.999854 | 4.012036 |
29dbca68-45b6-4d3e-9139-7eeea8a88028 | saradindurana/c-dsa | dtohex.cpp | #include<iostream>
#include<math.h>
using namespace std;
int main(){
int decim;
cin>>decim;
int rem,i=1;
char hex[50];
int c=0;
while(decim!=0){
rem=decim%16;
if(rem<10)
hex[i++]=rem+48;
else
hex[i++]=rem+55;
... | ALGO | 0.999819 | 3.821122 |
04f83365-5281-47b6-bbf9-627a35e5fc96 | mfkiwl/AlgorithmsData | Bits/MultiplyWithoutMulOperator.cpp | /*
https://www.geeksforgeeks.org/multiplication-two-numbers-shift-operator/
For any given two numbers n and m, you have to find n*m without using any multiplication operator.
Examples :
Input: n = 25 , m = 13
Output: 325
Input: n = 50 , m = 16
Output: 800
We can solve this problem with the shift operator. The idea... | ALGO | 0.999992 | 6.196022 |
de9f7918-0783-47aa-8eea-8f9228695018 | kirgy/marlin-firmware-ender-3-pro-skr-mini-e3-crtouch | Marlin/src/gcode/bedlevel/G35.cpp | #include "../../inc/MarlinConfig.h"
#if ENABLED(ASSISTED_TRAMMING)
#include "../gcode.h"
#include "../../module/planner.h"
#include "../../module/probe.h"
#include "../../feature/bedlevel/bedlevel.h"
#if HAS_MULTI_HOTEND
#include "../../module/tool_change.h"
#endif
#if ENABLED(BLTOUCH)
#include "../../feature/b... | TOOL | 0.968099 | 6.287665 |
f167dede-6ea2-4eea-9433-10d276cf0163 | armeanco/AlgoExpert | Medium/Smallest Difference/sol.cpp | #include <vector>
std::vector<int> smallestDifference(std::vector<int> arrayOne, std::vector<int> arrayTwo) {
int sz = arrayOne.size(), zs = arrayTwo.size(), st = 0, ts = 0, diff = 1e9;
std::sort(arrayOne.begin(), arrayOne.end());
std::sort(arrayTwo.begin(), arrayTwo.end());
std::vector<int> res(2, 0);
whil... | ALGO | 0.999965 | 5.582408 |
0af38516-7373-4a4e-94fd-6baffb2770e4 | maigamalabuhashima20/codeforces | The_Cake_Is_a_Lie.cpp | #include <iostream>
using namespace std;
int main()
{
short t, n, m;
int k;
cin >> t;
for (int i = 0; i < t; i++)
{
cin >> n >> m >> k;
if ((n * m - 1) == k)
cout << "yes\n";
else
cout << "no\n";
}
return 0;
}
| ALGO | 0.999216 | 4.04435 |
cc8a2a5e-d9e6-4e4f-b3c6-323ae37a715d | mmunos/cpjava | cf779/C.cpp | #include <iostream>
#include <algorithm>
// #include <vector>
// #include <map>
// #include <unordered_map>
#include <set>
// #include <unordered_set>
// #include <sstream>
using namespace std;
typedef long long int ll;
int main(){
int T;
cin >> T;
while(T--){
int n;
cin >> n;
int... | ALGO | 0.999949 | 4.049371 |
16b7c879-8791-48f3-bef5-fd6a5bc372df | manikanta2901/ubuntu | codingChallenges/cpp/Codechef/longChallenges/Year2020/may/bitwise.cpp | #include<iostream>
#include<bits/stdc++.h>
#include<vector>
#define loop(n) for(int i=0;i<n;i++)
#define loop1(n) for(int i = n-1; i >= 0; i-- )
#define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
#define ll long long int
void getBinary(ll n,vector<ll> & vect ){... | ALGO | 0.99994 | 3.529454 |
94fc3845-cc07-4e9d-9c1c-3a859f53829b | Sookmyung-Algos/2023algos | algos_assignment/이에나_njs07081/summer_seminar/28070.cpp | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define MAX 100001
#define INF 1e9
#define FASTIO cin.tie(0); cout.tie(0); ios::sync_with_stdio(false);
using namespace std;
int N;
int DP[MAX], Sum[MAX];
string A, B;
int Max = -1;
int Answer;
int parsing(string S) {
int Year = stoi(S.s... | ALGO | 0.999989 | 4.73602 |
65001f23-d85c-47a1-8bd0-34da79b38d7d | robtai29/cpp_practice | leetcode/242_Valid_Anagram.cpp | /******************************************************************************
https://leetcode.com/problems/valid-anagram/
7.4.2021
*******************************************************************************/
class Solution {
public:
bool isAnagram(string s, string t) {
if (s.length() != t.length())... | ALGO | 0.999982 | 6.845116 |
bd49484a-8409-4940-920b-70dfff520d10 | Snehal-Patil72/Development | LB Cpp program/program14.cpp | #include<iostream>
using namespace std;
class Demo
{
public:
bool Even(int iNo)
{
if((iNo%2)==0)
{
return true;
}
else
{
return false;
}
}
};
int main()
{
int iValue=0;
cout<<"Enter Number";
cin>>iValue;
Demo d;
bool res=false;
res=d.Even(iValue);
if(res==true)
{
c... | ALGO | 0.994366 | 4.251325 |
5ceb86ca-4c30-447e-82ab-488360757475 | chenzeyin9867/algorithm | 2021_3/combinationSum2/combinationsum.cpp | #include <iostream>
#include<vector>
#include <algorithm>
#include <numeric>
using namespace std;
// author:rmokerone
#include <iostream>
#include <vector>
using namespace std;
class Solution {
private:
vector<int> candidates;
vector<vector<int>> res;
vector<int> path;
public:
void DFS(int start, int... | ALGO | 0.999894 | 5.128045 |
cb9006bd-fa22-4aba-9f29-6cbbb1625df8 | ToRapture/acm-template | Useful/poj-1469二分匹配.cpp | #include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
const int N = 500;
vector<int> g[110];
int match[N];
bool vis[N];
bool dfs(int u) {
for(int i = 0; i < g[u].size(); ++i) {
int v = g[u][i];
if(!vis[v]) {
vis[v] = true;
if(match[v] == -1 || dfs(m... | ALGO | 0.999938 | 4.045477 |
ae0b5260-3384-4938-86af-4927030dd820 | Ishwarendra/CompetitiveProgramming | CodeForces/GNU C++20 (64)/1578E_Easy Scheduling/1578_E.cpp | #include<bits/stdc++.h>
using namespace std;
int mylog2(int x)
{
int power = 0;
while ((1LL << power) <= x)
power++;
power--;
return power;
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
int h, p;
c... | ALGO | 0.999463 | 4.203196 |
2b261463-d0e4-4068-9a4b-201752e5c7c9 | ishandutta2007/codeforces | erray/normal/1490/D.cpp | // author: erray
#include<bits/stdc++.h>
using namespace std;
template<typename T, typename F = function<T(const T&, const T&)>> class SparseTable {
public:
int sz, lg;
vector<vector<T>> table;
F cal;
SparseTable() { }
SparseTable(vector<T> v, F _cal) : cal(_cal) {
sz = (int) v.size();
lg = 32 - ... | ALGO | 0.999997 | 4.471038 |
89386796-8141-4b61-b245-1a4c314d33f6 | kurobaron/AtCoder | cpp/20191229/20191229a.cpp | #include <iostream>
using namespace std;
int main(void){
string s, t, ans;
cin >> s >> t;
ans = t + s;
cout << ans << endl;
return 0;
}
| ALGO | 0.996192 | 4.00155 |
847952be-fe22-4512-b884-d1c846ec1527 | wangxueming/AOSP7.1 | frameworks/av/media/libstagefright/codecs/m4v_h263/dec/src/get_pred_outside.cpp | /*
------------------------------------------------------------------------------
INPUT AND OUTPUT DEFINITIONS
Inputs:
xpos = x half-pixel of (x,y) coordinates within a VOP; motion
compensated coordinates; native data type
ypos = y half-pixel of (x,y) coordinates within a VOP; motion
co... | ALGO | 0.999756 | 6.728376 |
d76bae49-38e3-4bea-bff6-fb256b1f1064 | ishandutta2007/codeforces | demoralizer/normal/1276/B.cpp | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define all(x) (x).begin(),(x).end()
#define uniq(v) (v).erase(unique(all... | ALGO | 0.999937 | 4.529224 |
1a64702b-a164-454a-9bd7-de8bfce83b58 | hexu1985/cpp_book_code | cpp.std.lib/algo/heap1.cpp | #include "algostuff.hpp"
using namespace std;
int main()
{
vector<int> coll;
INSERT_ELEMENTS(coll,3,7);
INSERT_ELEMENTS(coll,5,9);
INSERT_ELEMENTS(coll,1,4);
PRINT_ELEMENTS (coll, "on entry: ");
// convert collection into a heap
make_heap (coll.begin(), coll.end());
PRINT_... | ALGO | 0.990299 | 4.663635 |
24de7789-86de-434b-a76e-7e3670ce76be | anialsonus/gpdb | src/backend/gporca/libgpopt/src/xforms/CXformSimplifyLeftOuterJoin.cpp | #include "gpopt/xforms/CXformSimplifyLeftOuterJoin.h"
#include "gpos/base.h"
#include "gpopt/base/CUtils.h"
#include "gpopt/operators/CLogicalConstTableGet.h"
#include "gpopt/operators/CLogicalLeftOuterJoin.h"
#include "gpopt/operators/CPatternLeaf.h"
#include "gpopt/operators/CPatternTree.h"
using namespace gpmd;
u... | ALGO | 0.979902 | 5.471586 |
f5aae58c-30eb-429a-a40e-e2f07f4c5b29 | inovia/IronHSP | hsp3ll/llvm/lib/IR/TypeFinder.cpp | #include "llvm/IR/TypeFinder.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
using namespace llvm;
void TypeFinder::run(const Module &M, bool onlyNamed) {
OnlyNamed = onlyNam... | TOOL | 0.872059 | 7.866551 |
db093585-feb7-46df-9426-1ca255d8c420 | JuanRomo-dev/ED-UCM | Ejercicios Juez/F2_11 Ordenacion lineal/Source.cpp | #include <iostream>
#include <iomanip>
#include <fstream>
#include <list>
using namespace std;
// función que resuelve el problema
void resolver(list<int>& lista) {
auto it = lista.begin();
auto anterior = lista.begin();
if (it != lista.end()) {
++it;
while (it != lista.end()) {
... | ALGO | 0.999784 | 4.384217 |
c198e6d5-26ca-481a-a677-900e41e31c2c | Danziger/CarND-T2-Model-Predictive-Control-MPC-Quizzes | 001-Global-Kinematic-Model/src/Eigen-3.3/doc/examples/Tutorial_ArrayClass_mult.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
ArrayXXf a(2,2);
ArrayXXf b(2,2);
a << 1,2,
3,4;
b << 5,6,
7,8;
cout << "a * b = " << endl << a * b << endl;
}
| ALGO | 0.985698 | 3.527115 |
933ff97c-b50e-4571-a121-e89516f11778 | PhanNgocTrieu/SWPCT | backtracking/sudokusolve.cpp | #include <bits/stdc++.h>
using namespace std;
typedef vector<vector<char>> vc;
class Solution {
public:
bool isValidValue(int i, int j, vc& board, char num) {
int n = board.size();
for (int k = 0; k < n; k++) {
// Row check
if (board[i][k] == num)
return... | ALGO | 0.999034 | 6.368835 |
b10edab6-2cb7-42a2-afc8-25a3620d4aee | ScorpionBytes/OpenEDR | edrav2/eprj/boost/libs/graph/example/cycle-file-dep2.cpp | // can't do using namespace boost because then
// we get conflict with boost::default_dfs_visitor.
using namespace boost;
namespace std {
template <typename T >
std::istream& operator >> (std::istream & in, std::pair < T, T > &p)
{
in >> p.first >> p.second;
return
in;
}
}
typedef adjacency_list... | ALGO | 0.995122 | 5.406087 |
39f4c7d5-3822-4ebc-829f-da21f1bfacc2 | sushilkumar20/Leetcode-Daily-question | 438-find-all-anagrams-in-a-string/438-find-all-anagrams-in-a-string.cpp | class Solution {
public:
vector<int> findAnagrams(string s, string p) {
vector<int> ans;
if(p.size()>s.size())
return ans;
vector<int> brr(26,0);
int k=p.size();
for(int i=0;i<p.size();i++)
{
brr[(int)(p[i]-'a')]++;
}
... | ALGO | 0.999967 | 5.814336 |
ad28c32b-72c1-481b-8ba6-8d7c7824b0e0 | kitewu/datastructure_algorithm | Leetcode/71.cpp | #include<iostream>
#include<vector>
#include<cstdlib>
#include<string>
using namespace std;
class Solution {
public:
string simplifyPath(string path) {
string res = "";
if(path.size() == 0)
return res;
vector<string> paths;
getPaths(paths, path, 1);
vector<strin... | ALGO | 0.999846 | 4.926171 |
215070e9-c332-4cc9-b9f3-adcb0a603363 | c786909486/mobile-ffmpeg-M | src/opencore-amr/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/qua_gain.cpp | /*
------------------------------------------------------------------------------
Filename: qua_gain.cpp
------------------------------------------------------------------------------
MODULE DESCRIPTION
Quantization of pitch and codebook gains.
------------------------------------------------------------------... | ALGO | 0.999597 | 5.507448 |
b09f52de-f12c-45eb-a295-2079e7643dad | pacha2880/competitive_programming_codes | Buildings.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define PI acos(-1)
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define sz(a) a.size()
#define srt(a) sort(all(a))
#define mem(a, h) memset(a, (h), sizeof(a))
#defi... | ALGO | 0.99999 | 4.873824 |
571bc863-85a6-48d5-ac95-be286a479316 | SNURobotics/AdaptiveControl_ | examples/DynamicsMatrix.cpp | #include "DynamicsMatrix.h"
using namespace Eigen;
DynamicsMatrix::DynamicsMatrix(robot1* pRobot, AdaptiveControl* pAdaptiveControl) : mpRobot(pRobot), mpAdaptiveControl(pAdaptiveControl)
{
mnJoint = mpRobot->R_Joint_ID::num_joints;
mvpEstimatedInertia = mpAdaptiveControl->mvpEstimatedInertia;
// initialize
vdot... | ALGO | 0.999451 | 5.255687 |
f090daa8-9418-4d73-a867-3173701eb8a6 | Ramdani101/basic-programming | 137_RamdaniMulyadi_Prak2_Soal2.cpp | #include <iostream>
using namespace std;
int main(){
int x,y;
cout << "Masukkan koordinat x dan y secara berurutan";
cin >> x >> y;
if (x > 0 && y >> 0)
{
cout << "Kuadran I";
}else if (x < 0 && y > 0)
{
cout << "Kuadran II";
}else if (x < 0 && y < 0)
{
cout... | ALGO | 0.9999 | 4.364938 |
d572bbe1-1f02-441f-87f2-f238831361d7 | Abhinow-katore/DSA-Cracker | DSA/SET/pra.cpp | #include<bits/stdc++.h>
#include <stdio.h>
using namespace std;
int main(){
set<int>s;
s.insert(10);
s.insert(10);
s.insert(5);
s.insert(6);
////////////
auto x=s.find(10);
if(x==s.end()) cout<<"NOT FOUND"<<"\n";
else{ cout<<"FOUND"<<"\n";}
//////////////////
// or//
/*
... | ALGO | 0.965933 | 3.757471 |
24895469-0688-4183-901d-e981985be261 | zkxshg/Test_of_LeetCode | 2864_Maximum_Odd_Binary_Number.cpp | // https://leetcode.com/problems/maximum-odd-binary-number/?envType=daily-question&envId=2024-03-01
// sorting
class Solution {
public:
string maximumOddBinaryNumber(string s) {
sort(s.begin(), s.end());
sort(s.begin(), s.end() - 1, greater<char>());
return s;
}
};
| ALGO | 0.999967 | 6.017836 |
1358198d-47d9-4d9c-82fa-438cffb92cd4 | RMCSa/SwiftProjetcs | flutter_application_routes/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.998156 | 6.763549 |
cc6bf92f-3439-4b76-b839-bfa52c4855a8 | Arbinshrestha1/Discrete_structure | Discrete_lab/lab5/lab5qn1.cpp | #include <iostream>
using namespace std;
int fact(int a){
if(a!=0){
return a* fact(a-1);
}
else{
return 1;
}
}
int permut(int n, int r){
return fact(n)/fact(n-r);
}
int main()
{
int n,r;
cout<<"Enter n: ";
cin>> n;
cout<<"Enter r: ";
cin>> r;
cout<<"Permutation of " <<n << ... | ALGO | 0.999243 | 4.92488 |
8a05daa8-0ee4-4497-95cb-17044faad088 | Moongss/ps | Baekjoon/20000-29999/22886.cpp | #include <bits/stdc++.h>
#define endl "\n"
#define fastio cin.tie(0)->sync_with_stdio(0)
#define x first
#define y second
#define all(v) v.begin(), v.end()
#define compress(v) sort(all(v)), v.erase(unique(all(v)), v.end())
#define lower(v, x) (int)(lower_bound(all(v), x) - v.begin())
#define upper(v, x) (int)(upper_bo... | ALGO | 0.999954 | 4.069199 |
232f53e2-ecf9-48c9-9ffe-28a1b9acc3e5 | moondemon68/cp | Codeforces/PastContests/1183/1183D.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define pii pair<int,int>
#define LL long long
using namespace std;
int main () {
//clock_t start = clock();
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
... | ALGO | 0.999925 | 4.278578 |
53a30763-b5fe-41e6-9593-b38f2b8f8399 | coderheck/learning-programming-languages | why-am-i-learning-cpp-now/grade-9/TrenTruong/feb 17th 2025/longlqd_17-2-2025_sang/cau2a.cpp | #include"iostream"
#include"string"
using namespace std;
#define ll long long
ll gcd(ll a,ll b){return(b==0)?a:gcd(b,a%b);}
string s;ll a,b;
int main(){
cin>>s;
for(int i=0;i<s.size();i++){
if((s[i]-'0')&1){b=b*10+s[i]-'0';}else{a=a*10+s[i]-'0';}
}
cout<<gcd(a,b);
} | ALGO | 0.999933 | 4.417865 |
5e29977e-9cf6-477a-a1a3-20266ae468c3 | parallel101/course | 07/06_ndarray/02/main.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <array>
#include <benchmark/benchmark.h>
#include <x86intrin.h>
#include <omp.h>
// L1: 32KB
// L2: 256KB
// L3: 12MB
constexpr size_t nx = 1<<13;
constexpr size_t ny = 1<<13;
std::vector<float> a(nx * ny);
void BM... | TEST | 0.979091 | 5.477781 |
74f413df-150e-4e9d-a841-5c86f03f77a3 | daniel0412/coding | leetcode/code/CombinationSum.t.cpp | #include "gtest/gtest.h"
#include "CombinationSum.h"
TEST(CombinationSum, CombinationSum)
{
CombinationSum sol;
vector<int> candidates={2,3,6,7};
int target = 7;
vector<vector<int>> res = sol.combinationSum(candidates, target);
for(auto v:res) {
for(auto d:v) {
cout << d << " ";... | ALGO | 0.914392 | 6.292184 |
d0a51fa1-8aad-4c0e-b3a5-b9ce5b9ae426 | dhanujg/-R-Package-Biological-Ecological-Density-Clustering | density_rodriguez.cpp |
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
NumericVector distanceToPeakCpp(NumericVector distance, NumericVector rho) {
int size = rho.size();
NumericVector peaks(size);
NumericVector maximum(size);
int i = 0;
for (int col = 0; col < size; col++) {
for (int row = col + 1; row < size;... | ALGO | 0.999836 | 5.564095 |
912ead60-9b78-40b6-b469-f5f1b9ca7787 | zhangyaowu1993/Zhang_Yao_Wu1993 | C C++/Sort/ShellSort.cpp | #include <iostream>
#include <Windows.h>
using std::cout;
using std::endl;
template< typename TYPE >
void Swap( TYPE * a, TYPE * b )
{
TYPE temp;
temp = * a;
* a = * b;
* b = temp;
}
template< typename TYPE >
void OutPut( TYPE * Num, int NumMaxLength )
{
for( int i = 0; i < NumMaxLength; i++ )
{
cout << Num[... | ALGO | 0.999432 | 3.738229 |
7b946849-9ac4-4577-9ce3-cfc5ffa6d84f | delicm/cses | Graphs/Round Trip II/main.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m;
vector <vector <int>> g;
vector <int> vis;
vector <int> last;
void init()
{
cin >> n >> m;
g.resize(n+1);
vis.resize(n+1, 0);
last.resize(n+1);
for(int i = 0; i < m; i++)
{
int a, b;
cin >> a >> b;
g[a].push_back... | ALGO | 0.999979 | 4.065469 |
cf37d83b-4a20-481a-ae32-21c964cfae4b | kinaphar/AtCoder | ABC/ABC250/c.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, s, n) for (int i = s; i < (int)(n); i++)
#define repl(i, s, n) for (ll i = s; i < (int)(n); i++)
int main() {
// cin の入力元が 'input.txt' になる
// std::ifstream in("input.txt");
// std::cin.rdbuf(in.rdbuf());
// ----------
int n, ... | ALGO | 0.999992 | 4.09198 |
00472fc0-c3f2-4027-80f2-12bfffa7c368 | Utkrisht2/Intresting-problems | problems+snippet/problem29.1.cpp | /*Rohit dreams he is in a shop with an infinite amount of marbles. He is allowed to select n marbles.
There are marbles of k different colors. From each color there are also infinitely many marbles.
Rohit wants to have at least one marble of each color, but still there are a lot of possibilities for his selection. In h... | ALGO | 0.999872 | 4.006411 |
e4e1c04c-72b8-4004-9e73-e0a82ee44c6c | ishandutta2007/codeforces | abc864197532/normal/1247/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define fop(i,m,n) for (int i=(m)-((m)>(n));i!=(n)-((m)>(n));i+=2*((m)<(n))-1)
#define test(x) cout << #x << ' ' << x << endl;
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define pii pair <int,int
int main () {
int a,b;
... | ALGO | 0.999828 | 4.577698 |
63a6c548-8159-4724-8ad7-b378c11455a3 | aaronzou/SketchRetrivel | bowlib/BofSearchManager.cpp | #include "BofSearchManager.h"
#include "vocabulary.h"
#include "quantizer.h"
#include "kmeans.h"
#include "histvw.h"
#include <fstream>
#include <QDir>
#include <QElapsedTimer>
BofSearchManager::BofSearchManager(QString folderPath) : folderPath(folderPath)
{
std::cout << "Building / loading vocabulary..\n";
... | ALGO | 0.997493 | 5.388966 |
9a73093e-f50c-4d4b-ae94-515110bb7169 | Thiernodjenabou/Devoir-POO | Atelier4/atelier4exo4.cpp | #include <iostream>
#include <cmath>
using namespace std;
class Vecteur3d {
public:
Vecteur3d(float a = 0, float b = 0, float c = 0)
: x(a), y(b), z(c) {}
void afficher() const {
cout << "Le vecteur est : (" << x << ", " << y << ", " << z << ")" << endl;
}
// par valeur
Vecteur3d ... | TOOL | 0.910051 | 4.447738 |
25ca1887-9fa9-4cee-b37e-908727b6548d | seopmin/Algorithm | BaekJoon/week_5/14888_연산자 끼워넣기.cpp | #include<iostream>
#include<limits.h>
#include<algorithm>
using namespace std;
int n, min_result = INT_MAX, max_result = INT_MIN;
int arr[11], oper_cnt[4];
int cal(int oper_idx, int v, int i) {
if(oper_idx==0) return v+arr[i];
if(oper_idx==1) return v-arr[i];
if(oper_idx==2) return v*arr[i];
return v/arr[i];
}... | ALGO | 0.999975 | 3.789284 |
0d77bc66-6c7b-41f8-ae24-49ff73e8b91b | 2FLing/study | CSCI-114(operating system)/Assignment3/CSci114_P3.cpp | // I executed my program on cygwin terminal
// Before execution, you have to convert the cpp file
// to exe by using g++ CSci114_P3.cpp -o anyname
// then you will see a anyname.exe in the same folder
// when you run the exe program you will need the
// size of those two matrixs. For example, if
// size of matrix A is... | ALGO | 0.9976 | 3.213808 |
058b0647-f415-45d7-a7ae-161183fde048 | iuiuiom/hhvm | hphp/runtime/ext/facts/ext_facts.cpp | #include <pwd.h>
#include <sys/types.h>
#include <chrono>
#include <filesystem>
#include <functional>
#include <iomanip>
#include <mutex>
#include <sstream>
#include <string>
#include <string_view>
#include <folly/Conv.h>
#include <folly/Hash.h>
#include <folly/concurrency/ConcurrentHashMap.h>
#include <folly/io/async... | TOOL | 0.86226 | 7.244517 |
fbcb314f-3961-4b0c-8bad-dce104758a66 | amyhue/CS32-projects | HW4/evenlist.cpp | //#include <list>
//#include <vector>
//#include <algorithm>
//#include <iostream>
//#include <cassert>
//using namespace std;
//
//// *** comment all above below
// Remove the even integers from li.
// It is acceptable if the order of the remaining even integers is not
// the same as in the original list.
void remove... | ALGO | 0.965716 | 4.657085 |
db86a22f-9e28-4999-af75-87757ae1fec3 | matthewschallenkamp/Red-Team-Code | open_kattis/kinversions/kinversions.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <complex>
using namespace std;
typedef long long ll;
//maxDist is the longest distince we can hit
//maxLength is the maximum length of a hole
int maxDist = 0, maxLength = 0;
void mult(vector<int> &a, vector<int> &b, vector<int> &c) {... | ALGO | 0.999976 | 3.545016 |
ba686a45-e4d6-47c0-98f8-57579577a462 | ks0727/AtCoder-Archive | ARC/151-200/167/a_ans.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
using ll = long long;
ll square(int a){
return (ll)a*a;
}
int main(){
int n,m;
cin >> n >> m;
vector<int> a(n);
rep(i,n) cin >> a[i];
rep(i,2*m-n) a.push_back(0);
sort(a.begin(),a.end());
ll ans = 0;
... | ALGO | 0.999916 | 3.505262 |
db5cc507-c6b5-44b2-9c5d-59d58f506128 | wenqf11/LeetCode | C++/78. Subsets/main.cpp | #include <iostream>
#include "solution.h"
int main()
{
Solution s;
vector<int> a = { 1, 2, 5 };
s.subsets(a);
system("pause");
return 0;
} | ALGO | 0.997137 | 4.71844 |
b1cfbf0c-0663-49ce-883e-5c06d4272497 | prashant-prashan/sumo | src/utils/geom/PositionVector.cpp | /****************************************************************************/
/****************************************************************************/
/// @file PositionVector.cpp
/// @author Daniel Krajzewicz
/// @author Jakob Erdmann
/// @author Michael Behrisch
/// @author Walter Bamberger
/// @date ... | TOOL | 0.922675 | 6.524223 |
d14d72dd-23c7-4823-a402-c93389afabfa | ishandutta2007/codeforces | danya090699/normal/1307/A.cpp | #include <bits/stdc++.h>
using namespace std;
main()
{
//freopen("input.txt", "r", stdin);
int t;
cin>>t;
while(t)
{
t--;
int n, d;
cin>>n>>d;
int ar[n];
for(int a=0; a<n; a++) cin>>ar[a];
for(int a=1; a<n; a++)
{
while(d>=a and ar[a])... | ALGO | 0.999964 | 3.100338 |
9571069a-2db8-401c-b49f-5158754e032c | Haozeee/Static-Program-Analyser | Team26/Code26/src/spa/src/source_processor/parser/SourceParser.cpp | #include "SourceParser.h"
#include <utility>
#include "source_processor/exception/SourceException.h"
#include "source_processor/exception/SourceProcessorExceptionMessage.h"
#include "common/parser/ShuntingYardParser.h"
#define INITIAL_STMT_INDEX 0
#define STMTLIST_START "{"
#define STMTLIST_END "}"
#define BRACKETS_S... | TOOL | 0.924986 | 7.368919 |
7f4cce83-4321-42ec-bfec-f4b04a5c10d4 | captaingabi/coding-practice | cpp/non_divisible_subset.cpp | #include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
vector<string> split(const string &);
/*
* Complete the 'nonDivisibleSubset' function below.
*
* The function is expected to return an INTEGER.
* The function accepts following parameters:
* 1. INTEGER k
... | ALGO | 0.99995 | 4.51972 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.