uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
7a88450f-2bee-48b6-b708-a8995a73266c | raphsaeed/projectZERO | src/projectZERO.cpp | #include <iostream>
#include <vector>
#include <string>
#include <future>
using namespace std;
int computeResult()
{
// Simulating a long computation
std::cout << "In the thread now..." << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(3));
return 42;
}
int computeMatrix()
{
// ... | TOOL | 0.997496 | 5.986232 |
0856826f-b07f-4d66-b4e2-f1d533b25be9 | cxxzhang/qt6_5_for_xp | qtbase/src/network/access/qhsts.cpp | #include "qhsts_p.h"
#include "QtCore/private/qipaddress_p.h"
#include "QtCore/qlist.h"
#if QT_CONFIG(settings)
#include "qhstsstore_p.h"
#endif // QT_CONFIG(settings)
QT_BEGIN_NAMESPACE
static bool is_valid_domain_name(const QString &host)
{
if (!host.size())
return false;
// RFC6797 8.1.1
// ... | TOOL | 0.93198 | 4.358049 |
eab3b47b-492f-46d5-8e48-d336ac511c16 | Niltiwari7/Topic-wise-question-for-Interview | LinkedList/medium/234. Palindrome Linked List.cpp | // Time complextity = O(n) space complexity - O(n)
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*... | ALGO | 0.999098 | 4.920665 |
0164a0db-4d6f-425a-a1cd-73decb5c94a3 | vladimir-andreevich/node.js-windows-7 | v14/node-v14.19.3/deps/icu-small/source/common/uarrsort.cpp | #include <cstddef>
#include "unicode/utypes.h"
#include "cmemory.h"
#include "uarrsort.h"
enum {
/**
* "from Knuth"
*
* A binary search over 8 items performs 4 comparisons:
* log2(8)=3 to subdivide, +1 to check for equality.
* A linear search over 8 items on average also performs 4 compar... | ALGO | 0.999965 | 7.505062 |
80bd7f70-4732-4ccf-a2da-aac4631e39bc | xcszbdnl/TrainingCode | AcmCode/poj2342.cpp | #include <iostream>
#include <cstdio>
#include <vector>
#include <string.h>
using namespace std;
#define MAX_NUMBER 6004
#define max(a,b) ((a) > (b)) ? (a) : (b)
vector<int> tree[MAX_NUMBER];
int rating[MAX_NUMBER], vis[MAX_NUMBER];
int point_number;
int dp[MAX_NUMBER][2];
int search(int root, int invited) {
if... | ALGO | 0.999595 | 3.740455 |
1e39074b-a893-4306-8549-6afc7dd05828 | topling/topling-ark | test/fsa/src/adfa/iter.cpp | #include <terark/fsa/dfa_algo.hpp>
#include <terark/fsa/automata.hpp>
#include <getopt.h>
using namespace terark;
int main(int argc, char* argv[]) {
std::auto_ptr<MatchingDFA> dfa(MatchingDFA::load_from(stdin));
ADFA_LexIteratorUP iter(dfa->adfa_make_iter());
iter->seek_lower_bound(argc >= 2 ? argv[1] : "");
whil... | TOOL | 0.932673 | 5.216334 |
6e2530ee-b63a-4d89-b8fd-09f393fe8122 | POC-2025/leetcode | solution/2900-2999/2960.Count Tested Devices After Test Operations/Solution.cpp | class Solution {
public:
int countTestedDevices(vector<int>& batteryPercentages) {
int ans = 0;
for (int x : batteryPercentages) {
ans += x > ans;
}
return ans;
}
}; | ALGO | 0.999572 | 6.024675 |
2a1de7ae-7c56-4246-b7a2-f22f701ffcc3 | Abhaycl/CarND-MPC-2P5 | src/Eigen-3.3/doc/examples/matrixfree_cg.cpp | #include <iostream>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <Eigen/IterativeLinearSolvers>
#include <unsupported/Eigen/IterativeSolvers>
class MatrixReplacement;
using Eigen::SparseMatrix;
namespace Eigen {
namespace internal {
// MatrixReplacement looks-like a SparseMatrix, so let's inherits its trai... | ALGO | 0.997298 | 6.161131 |
4a0755c5-05e3-4591-9c60-7f2ec5e2687a | merayes/UnityHelicopterGame | helicopter/Library/PackageCache/com.unity.ide.visualstudio@2.0.11/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <filesystem>
#include <windows.h>
#include <shlwapi.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 made to Visual Studio can fail after ... | TOOL | 0.952659 | 6.947423 |
cf219b0c-4883-469d-ae7a-8810d4cd8de1 | Arnav-Soney/CP-31-Solutions | 1000/Beautiful_Array.cpp | #include<bits/stdc++.h>
#define ll long long
#define lli long long int
#define pb push_back
#define fr(a,b) for(int i = a; i < b; i++)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define inf (1LL<<60)
#define all(x) (x).begin(), (x).end()
#define prDouble(x) cout << fixed << setprecision(10) <<... | ALGO | 0.999264 | 3.086469 |
be674272-4781-4380-ae8d-2a51a620f61e | Seungchan0325/baekjoon | solutions/22348_0.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;
const ll SQMX = 500;
const ll MAX = 100005;
ll DP[2][MAX], psum[MAX], ans[MAX];
int main()
{
ios_base::sync_with_stdio(false); cin.tie(NULL);
int tc;
cin >> tc;
vector<pair<ll, ll>> v(tc);
for(auto& [a,... | ALGO | 0.999631 | 4.462643 |
55492bdc-e6c0-43b8-a3c4-58135785de00 | JayasinghePasan/Aerial-Mapping-Robot-opencv | 3rdParty/opencv/sources/samples/cpp/calibration.cpp | #include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/calib3d.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/highgui.hpp"
#include <opencv2/objdetect/charuco_detector.hpp>
#include <cctype>
#include <stdio.h>
#include <s... | TOOL | 0.933445 | 5.870005 |
96dd77e3-531d-49f1-80a9-9828b3cf99b4 | AkashB005/DSA0112-C- | pro 18.cpp | #include <iostream>
using namespace std;
int main() {
int n, i;
bool isPrime = true;
cout << "Enter a positive integer: ";
cin >> n;
if (n <= 1) {
isPrime = false;
} else {
for (i = 2; i <= n / 2; ++i) {
if (n % i == 0) {
isPrime = false;
... | ALGO | 0.999776 | 4.739606 |
40f12fb2-95c9-47c8-b3b0-f651f3eb51c7 | adamzhen/Team-Vestigo | GUI/VisualizationToolDev/Eigen/doc/snippets/Tutorial_solve_triangular.cpp | Matrix3f A;
Vector3f b;
A << 1,2,3, 0,5,6, 0,0,10;
b << 3, 3, 4;
cout << "Here is the matrix A:" << endl << A << endl;
cout << "Here is the vector b:" << endl << b << endl;
Vector3f x = A.triangularView<Upper>().solve(b);
cout << "The solution is:" << endl << x << endl;
| ALGO | 0.99973 | 3.055453 |
7891e3cf-8590-4979-9137-afd44e9e3601 | sss-ram/CrackYourPlacement | Day17/symmetricTree.cpp | class Solution {
public:
bool helper(TreeNode* n1, TreeNode* n2) {
if(!n1 && !n2)
return true;
if(!n1 && n2)
return false;
if(n1 && !n2)
return false;
if(n1->val != n2->val)
return false;
return helper(n1->left, n2->right) && h... | ALGO | 0.999984 | 6.693062 |
1c1ee8d8-153a-496b-9220-f14afa3f3666 | srcode03/codingquestions | Easy/Reverse Level Order Traversal/reverse-level-order-traversal.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
struct Node *left;
struct 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.999769 | 6.846282 |
59e72d93-ce5d-40c0-ae3d-a4764f59ba08 | arrryan05/Problem-Solving | 48-rotate-image/48-rotate-image.cpp | class Solution {
public:
void rotate(vector<vector<int>>& matrix) {
int n=matrix.size();
for(int i=0;i<n;i++)
for(int j=0;j<i;j++)
swap(matrix[i][j],matrix[j][i]);
for(int i=0;i<n;i++)
reverse(matrix[i].begin(),matrix[i].end());
}
}; | ALGO | 0.999978 | 6.266763 |
e19b6041-9304-49ac-bfc7-86eae4bcf844 | SafronovAlexey/RBPO3 | BPZ1902.Safronov.Lab3.Task4.f1.cpp | module BPZ1902.Safronov.Lab3.Task4:f1;
import<cmath>;
namespace RBPO {
namespace Lab3 {
namespace Task4 {
double f1(double x) {
return pow((1 + x + x * x) / (2 * x + x * x) + 2 - (1 - x - x * x) / (2 * x - x * x), -1) * (5 - 2 * x * x);
}
}
}
} | ALGO | 0.999826 | 3.56649 |
1de37f00-5862-411f-948c-efd127644333 | cj1ne/Algorithm | Algorithm/백준 알고리즘 - 연습/5557_1학년.cpp | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
vector<vector<long long>> d(n - 1, vector <long long>(21, 0));
for (int i = 0; i < n; i++) {
cin >> a[i];
}
d[0][a[0]] = 1;
for (int i = 0; i < n - 2; i++) {
for (int j = 0; j <= 20; j++) {
if ... | ALGO | 0.999931 | 3.776845 |
b2e94fb0-2938-482c-b5c1-feb37fd35daf | savvaniss/nefeli-core | src/multisig/multisig.cpp | #include "crypto/crypto.h"
#include "cryptonote_basic/account.h"
#include "cryptonote_basic/cryptonote_format_utils.h"
#include "cryptonote_config.h"
#include "include_base_utils.h"
#include "multisig.h"
#include "ringct/rctOps.h"
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <vector>... | ALGO | 0.994175 | 6.562992 |
68307c9d-744d-4837-b709-8b24b5d19cea | LearningAchievements-masdevas/CompOpt | src/main.cpp | #include <chrono>
#include <ittnotify.h>
#include <mkl.h>
#include <tbb/tbb.h>
#include "data_gen.hpp"
#include "logreg.hpp"
#include "metrics.hpp"
#include "structures.hpp"
#include "verbose.hpp"
__itt_domain *domain = __itt_domain_create("LogReg.Domain.Global");
__itt_string_handle *handle_data_gen =
__itt_str... | DATA | 0.937267 | 6.700161 |
586e226e-df3c-48e8-8ca1-77d34cd3a64c | anjali-raja-14/cpp | range_loop.cpp | // #include<iostream>
// using namespace std;
// int main()
// {
// int data[ ]={1,10,-1,5,6,-1,7,-99,8,10};
// for(auto n:data)
// {
// if(n==-99)
// {
// break;
// }
// if(n<0)
// {
// continue;
// }
// cout<<n<<"\t";
// }
// ... | ALGO | 0.999506 | 3.380555 |
ace4c666-ddc9-438d-a59e-ca19452c19fa | kshitij86/code-examples | codechef/aug_long_20/card.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> veci;
typedef vector<string> vecs;
typedef vector<long> vecl;
typedef vector<vector<int>> vecvi;
typedef vector<vector<string>> vecvs;
#define REP(i, a, b) for (i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
void print_arr(int ... | ALGO | 0.999832 | 4.276524 |
dd6f0063-4087-470e-a9e2-8ba0605d6e37 | dabaier/code | 可视化/数据处理相关文件/Dataset/train/24_Daffodils/Daffodils-5.cpp | #include <iostream>
using namespace std;
int main()
{
int f=100,b,c,d,e;
while(f>=100&&f<=999)
{
d=f%10;
c=(f/10)%10;
b=f/100;
e=(d*d*d)+(c*c*c)+(b*b*b);
if(e==f)
{
cout<<f<<" ";
}
f++;
}
return 0;
}
| ALGO | 0.998804 | 3.426244 |
03e9ca3e-656f-4728-9da6-5417b44de4b4 | lgmamaniap/juki-practice | test-dh/cancion-para-mi-amada.cpp | #include <bits/stdc++.h>
using namespace std;
vector<string> split(const string &cadena, char delimitador)
{
vector<string> partes;
istringstream ss(cadena);
string parte;
while (getline(ss, parte, delimitador))
{
partes.push_back(parte);
}
return partes;
}
double contadorCompas(string texto)
{
... | ALGO | 0.999734 | 3.836014 |
53a20b31-7bf4-4da4-a475-bbb25771e7e0 | RupeshArora24/C_Plus_Plus | Code_Cief Questions/Billard 2 player game/code.cpp | /*Problem
The game of billiards involves two players knocking 3 balls around on a green baize table. Well, there is more to it, but for our purposes this is sufficient.
The game consists of several rounds and in each round both players obtain a score, based on how well they played. Once all the rounds have been play... | ALGO | 0.999953 | 3.974921 |
5668b2b6-0f4a-4d3d-89a0-c9d1b31602bb | NavdeepKaurRupaul/DSA | STACK AND QUEUE/QUEUE/queue using linked list.cpp | #include<iostream>
using namespace std;
template <typename T>
class Node {
public :
T data;
Node<T> *next;
Node(T data) {
this -> data = data;
next = NULL;
}
};
template<typename T>
class Queue {
Node<T> *head;
Node<T> *tail;
int size;
public :
Queue() {
... | ALGO | 0.999327 | 4.182005 |
d7b00dda-b174-4737-81a0-34a01bdb682d | kmac3063/Training | Codeforces/Div3/650A.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <numeric>
#include <map>
#define ll long long
using namespace std;
int main() {
int t; cin >> t;
while (t--) {
string s; cin >> s;
string ans = "";
ans.push_back(s[0]);
for (int... | ALGO | 0.999979 | 4.828852 |
96f751c1-4e0d-4537-a65d-f1d2750f182a | DearSouth/LeetCodeProject | lc714.cpp | #include<iostream>
#include <vector>
using namespace std;
class Solution {
public:
int maxProfit(vector<int>& prices, int fee) {
int len = prices.size();
//vector<vector<int>> dp(len, vector<int>(2));
//dp[0][0] = 0;
//dp[0][1] = -prices[0];
vector<int> dpnew(2);
... | ALGO | 0.999621 | 5.028832 |
9c310047-1c04-452f-91b7-606414238af5 | Aadhavan2906/CPP | GeeksForGeeks/Level Order Traversal.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
struct Node* left;
struct Node* right;
Node(int x){
data = x;
left = right = NULL;
}
};
class Solution
{
public:
vector<int> levelOrder(Node* root)
{
vector<int> ans;
queue<Node*... | ALGO | 0.99998 | 4.928751 |
2872b81d-1066-4c08-9499-fa806bf4c3af | RajMakkad/LeetCode | pairs-of-songs-with-total-durations-divisible-by-60/pairs-of-songs-with-total-durations-divisible-by-60.cpp | class Solution {
public:
int numPairsDivisibleBy60(vector<int>& time) {
vector<int> count(60,0);
int ans = 0;
for(auto &i:time){
ans += count[(60 - i%60)%60];
count[i%60]++;
}
return ans;
}
}; | ALGO | 0.999848 | 5.628282 |
63172b19-9f49-4a7d-8836-b4d0bdac9b9c | taylor-mitchell/OGLCI | external-libraries/boost_1_73_0/libs/geometry/doc/src/examples/geometries/adapted/boost_range/uniqued.cpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// QuickBook Example
//[boost_range_uniqued
//` Shows how to use a Boost.Geometry ring, made unique by Boost.Range adaptor
#include <iostream>
#include <boost/assign.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <b... | TOOL | 0.860915 | 6.015712 |
1cd42a42-4571-48fa-af17-0195ba2eb863 | gabrielrussoc/competitive-programming | codeforces/791c.cpp | #include <bits/stdc++.h>
#define pb push_back
using namespace std;
typedef long long ll;
bool v[55];
string last;
string next() {
if(last.length() == 1) {
if(last[0] < 'Z') {
string ret = " ";
ret[0] = last[0] + 1;
last = ret;
}
else {
last =... | ALGO | 0.999939 | 3.021088 |
1bd8c47f-d5af-4187-ae89-377955847689 | geyixin/awesome-Leetcode | stack/496-next-greater-element.cpp | /*
* @Author: Eashin
* @Date: 2020-03-30 20:56:21
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /stack/496-next-greater-element.cpp
*/
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
vector<int> nextGreaterElement(vector<int>& ... | ALGO | 0.999945 | 5.071724 |
296c3952-fbbe-492e-bf9b-9d565d6d2f08 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_3659_6.cpp | #include <bits/stdc++.h>
using namespace std;
int H, M, K;
int NonZeroDigit(int x) {
int res;
while (x) {
if (x % 10) res++;
x /= 10;
}
return res;
}
int Get(int x, int p) {
for (int i = 1; i < p; ++i) x /= 10;
return x;
}
long long Solve(int h, int m) {
int d = NonZeroDigit(M - 1);
long long re... | ALGO | 0.999607 | 4.225575 |
ed7089ff-717e-440c-9b28-a96b8918d2fc | GaryZ700/CPSC298_Assignment2 | Ch3Ex5.cpp | /*Gary Zeri
ID:2321569
<EMAIL>
CPSC298-01
Assignment 2, Ch3 Ex5
Program to provide fashion advice to the user.*/
#include <cmath>
#include "Menu.h"
using namespace std;
//declare all function prototypes here
float getHatSize(float weight, float height);
float getJacketSize(float weight, float height, int age);
float ... | TOOL | 0.920495 | 4.147639 |
15845973-82fe-4a34-859f-39510af72603 | ajdhole/Udacity-MPC-Controller-Project | src/Eigen-3.3/doc/examples/class_CwiseUnaryOp_ptrfun.cpp | #include <Eigen/Core>
#include <iostream>
using namespace Eigen;
using namespace std;
// define function to be applied coefficient-wise
double ramp(double x)
{
if (x > 0)
return x;
else
return 0;
}
int main(int, char**)
{
Matrix4d m1 = Matrix4d::Random();
cout << m1 << endl << "becomes: " << endl << ... | ALGO | 0.963992 | 4.120226 |
4bcde22f-e757-4cd9-98ad-8321bf1d1ca8 | Jacob-xyb/leetcode_Jacob | cpp/Jx2021/0217.存在重复元素_S_END.cpp | #include "../Jx_test.h"
//ѭԽ99%⣬ǻ̫
//ʱ
bool containsDuplicate_Jx001(vector<int>& nums)
{
for (int i = 0; i < nums.size()-1; i++)
{
for (int j = 1; i+j < nums.size(); j++)
{
if (nums[i] == nums[i + j]) return true;
}
}
return false;
}
//ʱ
bool containsDuplicate_Jx002(vector<int>& nums)
{
int len = nums.... | ALGO | 0.999649 | 5.203498 |
b186054e-d814-47de-9f62-917d900bc923 | anthony-chaudhary/self-driving-car-nanodegree-nd013 | p10-model-predictive-control/src/Eigen-3.3/bench/benchCholesky.cpp |
// g++ -DNDEBUG -O3 -I.. benchLLT.cpp -o benchLLT && ./benchLLT
// options:
// -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3
// -DEIGEN_DONT_VECTORIZE
// -msse2
// -DREPEAT=100
// -DTRIES=10
// -DSCALAR=double
#include <iostream>
#include <Eigen/Core>
#include <Eigen/Cholesky>
#include <bench/BenchUtil.h>
using na... | TEST | 0.987976 | 5.938015 |
4bbc3496-5611-480f-b96f-68e0226448de | iesl/knnlm-retrieval-quality | fairseq/clib/libbleu/libbleu.cpp | #include <map>
#include <array>
#include <cstring>
#include <cstdio>
typedef struct
{
size_t reflen;
size_t predlen;
size_t match1;
size_t count1;
size_t match2;
size_t count2;
size_t match3;
size_t count3;
size_t match4;
size_t count4;
} bleu_stat;
// left trim (remove pad)
vo... | ALGO | 0.993071 | 5.350801 |
088e1721-4f6a-48a3-a212-eb76feab1d2c | tonoysheikh/comparative-programming-cpp- | hacker rank/plus minus.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define nl '\n'
#define pb push_back
#define ppb pop_back
#define mod 1000000007
#define pi 3.1415926535897932384626433832795
void yes() { cout<<"YES\n"; }
void no() { cout<<"NO\n"; }
void solve()
{
ll len;
cin >> len;
int pos = 0, z... | ALGO | 0.999829 | 3.554349 |
a2cddc72-5aeb-45eb-8d75-a1136c1b40d9 | ds092002/ds_cpp | function_overloading.cpp | #include<iostream>
using namespace std;
class function
{
public :
void area(double r)
{
cout << "Enter Area Of Circle : "<< 3.14 * r * r << endl ;
}
void area(int s)
{
cout <<"Enter Area Of Squar : "<< s * s << endl;
}
void area(double w ,double h)
{
cout ... | ALGO | 0.951834 | 3.798568 |
ef65752f-8a70-4a6f-bba0-37744a8a9873 | HelloMinchan/problem-solving | BaekjoonOnlineJudge/1937/1937.cpp | #include <iostream>
using namespace std;
int n;
int bambooForest[501][501];
int memoization[501][501];
int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
int maxAliveDay = 0;
int DFS(int i, int j)
{
if (memoization[i][j])
return memoization[i][j];
memoization[i][j] = 1;
int ii = 0;
int jj = 0... | ALGO | 0.999814 | 4.782186 |
cc794b15-23db-4f88-aabe-ecb6d1ce79d5 | sunjuwhan/PX4-Autopilot | src/modules/flight_mode_manager/tasks/ManualAcceleration/FlightTaskManualAcceleration.cpp | /**
* @file FlightTaskManualAcceleration.cpp
*/
#include "FlightTaskManualAcceleration.hpp"
using namespace matrix;
bool FlightTaskManualAcceleration::activate(const trajectory_setpoint_s &last_setpoint)
{
bool ret = FlightTaskManualAltitudeSmoothVel::activate(last_setpoint);
_stick_acceleration_xy.resetPositio... | ALGO | 0.864 | 6.587326 |
b2b73f8f-912d-4ae9-b147-a6e9671a507f | happyjain369/SignUp-SignIn-using-Flutter | 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 |
406019cf-36eb-488d-a31b-8cf753dd088e | valeriashershen/ModelingAndMeasure | ThirdParty/eigen/doc/examples/class_CwiseUnaryOp_ptrfun.cpp | #include <Eigen/Core>
#include <iostream>
using namespace Eigen;
using namespace std;
// define function to be applied coefficient-wise
double ramp(double x)
{
if (x > 0)
return x;
else
return 0;
}
int main(int, char**)
{
Matrix4d m1 = Matrix4d::Random();
cout << m1 << endl << "becomes: " << endl << ... | ALGO | 0.98749 | 4.120226 |
43067bfa-8976-4939-a6c5-6cec0492f8eb | minxuanjun/VINSMONO | vins_estimator/thirdparty/eigen/bench/bench_reverse.cpp |
#include <iostream>
#include <Eigen/Core>
#include <bench/BenchUtil.h>
using namespace Eigen;
#ifndef REPEAT
#define REPEAT 100000
#endif
#ifndef TRIES
#define TRIES 20
#endif
typedef double Scalar;
template <typename MatrixType>
__attribute__ ((noinline)) void bench_reverse(const MatrixType& m)
{
int rows = m.r... | TEST | 0.883114 | 5.595998 |
4c3f541b-9386-4e47-a8e4-784eb3dfbdeb | smh997/Problem-Solving | Online Judges/Kattis/buzzwords.cpp | /*
* https://open.kattis.com/problems/buzzwords
* Author: https://github.com/smh997/
*/
#include <bits/stdc++.h>
using namespace std;
#define MAX_N 200010
char T[MAX_N];
int n;
int RA[MAX_N], tempRA[MAX_N];
int SA[MAX_N], tempSA[MAX_N];
int c[MAX_N]; // for counting/radix sort
void countingSort(int k) {
int i... | ALGO | 0.999806 | 3.788117 |
ee16e0ea-cfa1-454a-9668-51fc9990ba75 | kiril-teach/CITB107-2021 | lab05/change.cpp | #include <iostream>
#include <iomanip>
using namespace std;
/*
Input:
-------------------
4380 10000
Output
-------------------
Change: 56.20
1x 50.00 // 5620 / 5000 = 1 rem 620
1x 5.00 // 620 / 500 = 1 rem 120
1x 1.00
1x 0.20
*/
int main()
{
int price, paid;
cin >> price >> paid;
if (cin.fail()) {
... | ALGO | 0.970212 | 4.753585 |
834a86d1-3bb9-4bb8-9f85-3714c6e6ab1d | lakshaydhiman70/Competitive-Programming | BinarySearch/FindPeakElement.cpp | #include<bits/stdc++.h>
using namespace std;
int peakElement(vector<int>&arr){
int n = arr.size();
int low = 0, mid, high = n-1;
while(low <= high){
mid = (high + low)/2;
if(arr[mid] ){
}
}
}
int main(){
vector<int> arr = {1, 1, 2, 2, 3, 3, 4, 4, 5};
int n ... | ALGO | 0.999921 | 4.576318 |
ebc2c916-d7ba-4fc8-9cdb-9fba45dbcf73 | Shubhamp6/CP_Codes_Cpp | codeforces/B_Amr_and_Pins.cpp | #include<bits/stdc++.h>
using namespace std;
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL),cout.tie(NULL);
double r,x,y,x1,y1;
cin >> r >> x >> y >> x1 >> y1;
double d = sqrt((x-x1)*(x-x1)+(y-y1)*(y-y1));
cout << ceil(d/(2*r));
return 0;
} | ALGO | 0.999343 | 3.024465 |
c7498320-5abf-4401-9a26-f2426c350ed7 | raincross7/code-similarity | codes/train_code/problem268/problem268_31.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int s;
cin>>s;
vector<int> x(1000000);
int ans=1;
int ansh=0;
x[0]=s;
for(int i=1;i<1000000;i++){
if(s%2==0){
s/=2;
}
else{
s=3*s+1;
}
x[i]=s;
for(int j=0;j<i-1;j++){
if(s==x[j]){
ansh++;
b... | ALGO | 0.999987 | 4.193914 |
7ae58543-78c6-4ce4-a2a4-ff0f86d9ba97 | henryvuoj/BigOBlue | blue/class_8_dijkstra/travelling_cost.cpp | //
// Created by VHHV on 27/4/25.
//
#include <iostream>
#include <vector>
#include <queue>
#define MAX 505
using namespace std;
//ALGORITHM IMPLEMENTATION
struct NodeCost {
int id;
int cost;
bool operator<(const NodeCost &other) const {
return cost < other.cost;
}
bool operator>(const No... | ALGO | 0.999854 | 4.639629 |
a3bf987d-5be5-4a9a-823d-75b120f5f71e | wssmith/Sensor-Watch | SensorWatch/tinyusb/hw/mcu/nxp/mcux-sdk/devices/LPC55S14/mcuxpresso/startup_lpc55s14.cpp | #if defined (DEBUG)
#pragma GCC push_options
#pragma GCC optimize ("Og")
#endif // (DEBUG)
#if defined (__cplusplus)
#ifdef __REDLIB__
#error Redlib does not support C++
#else
//*****************************************************************************
//
// The entry point for the C++ library startup
//
//********... | CONFIG | 0.90352 | 7.162563 |
a76e42c2-f87c-4e7e-a217-e0f9ce16e32a | danadrianmirea/serenity | Userland/Utilities/du.cpp | #include <AK/ByteString.h>
#include <AK/LexicalPath.h>
#include <AK/NumberFormat.h>
#include <AK/Vector.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/DateTime.h>
#include <LibCore/DirIterator.h>
#include <LibCore/File.h>
#include <LibCore/System.h>
#include <LibMain/Main.h>
#include <limits.h>
#include <string.h... | TOOL | 0.908835 | 6.384713 |
963c2513-1f18-4058-971b-7d4ca99d4481 | DKcode9/OpenglViewer5 | EmptyViewer/sphere_scene.cpp | #include <Windows.h>
#include <iostream>
#include <limits>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <GL/glew.h>
#include <GL/GL.h>
#include <GL/freeglut.h>
#define GLFW_INCLUDE_GLU
#define GLFW_DLL
#include <GLFW/glfw3.h>
#include <vector>
#define GLM_SWIZZLE
#include <glm/glm.hpp>
#in... | ALGO | 0.973949 | 5.068541 |
14087a79-4c65-47a6-b9ca-bbaa2fed9c44 | berquist/exercism | cpp/hamming/hamming.cpp | #include <algorithm>
#include <numeric>
#include <stdexcept>
#include <vector>
#include "hamming.h"
namespace hamming {
unsigned compute(const std::string &left, const std::string &right) {
if (left.size() != right.size()) {
throw std::domain_error("mismatch in input lengths");
}
std::vector<unsig... | ALGO | 0.998562 | 6.512061 |
f5283b6f-98c5-4f09-b84f-0315920078f2 | devbharat/gtsam | timing/timeIncremental.cpp | /**
* @file timeIncremental.cpp
* @brief Overall timing tests for incremental solving
* @author Richard Roberts
*/
#include <gtsam/base/timing.h>
#include <gtsam/slam/dataset.h>
#include <gtsam/geometry/Pose2.h>
#include <gtsam/slam/PriorFactor.h>
#include <gtsam/slam/BetweenFactor.h>
#include <gtsam/slam/Be... | TEST | 0.951087 | 3.783037 |
c471efd3-5e1b-425a-8097-114834529ff6 | shah-zx/plus-plus-C | Hackerrank/fairratios.cpp | #include <bits/stdc++.h>
#include <stack>
#include <queue>
#include <math.h>
#include <limits.h>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
using namespace std;
#define vi vector<int>
#define vii vector<pair<int, int>>
#define pii pair<int, int>
#define rep(i, a, b) for (int i = a; i < b; i+... | ALGO | 0.99999 | 4.019673 |
8601d518-0574-4b61-beb1-be788abc2f46 | KimJungMook/C-Algorithm | 백준 코드/BOJ 13160.cpp | #include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
vector <pair<int,int>> v;
vector <pair<int,int>> ary;
int u,maximum,position;
int main()
{
int first_num;
int first_input,second_input;
scanf("%d",&first_num);
for(int i=0;i<first_num;i++)
{
scanf("%d %d",&first_inpu... | ALGO | 0.999976 | 3.413328 |
aad18314-5346-43b7-b5b6-357a77862acd | mrshiposha/EditedUE4 | Engine/Source/ThirdParty/OpenSubdiv/3.2.0/opensubdiv/osd/d3d11ComputeEvaluator.cpp | #include "../osd/d3d11ComputeEvaluator.h"
#include <cassert>
#include <sstream>
#include <string>
#include <vector>
#define INITGUID // for IID_ID3D11ShaderReflection
#include <D3D11.h>
#include <D3D11shader.h>
#include <D3Dcompiler.h>
#include "../far/error.h"
#include "../far/stencilTable.h"
namespace Open... | TOOL | 0.872864 | 7.441161 |
a0f00956-e7eb-4e54-b59f-f96730e0e756 | doubleZ0108/my-C-Cpp-study | EverydayCode/EverydayCode17.cpp | #include <iostream>
#include <cstdlib>
#include <queue>
using namespace std;
#define ROW 10
int main(void)
{
queue<int> que;
que.push(1); que.push(1);
int leftup = 0, up = 0;
for (int i = 1; i <= 10; ++i)
{
que.push(0);
for (int j = 0; j < i + 2; ++j)
{
up = que.front();
que.pop();
que.push(left... | ALGO | 0.999919 | 3.278051 |
edb336b5-e324-44ea-93c0-487a1ec0e14e | chikai-ito/Library-The_atama | enjapma/main-library/Graph/diameter.cpp | void bfs(ll v, vec& costTable) {
queue<ll> que;
for (int i = 1; i <= n; i++) {
costTable[i] = INF;
}
costTable[v] = 0;
que.push(v);
while (que.size()) {
ll v = que.front(); que.pop();
for (int i = 0; i < G[v].size(); i++) {
ll nv = G[v][i];
if (cos... | ALGO | 0.999818 | 4.822929 |
62f9c80a-ee4e-4f1b-beae-13ed13aa92ed | SontuCoder/DSA-in-Cpp | 12.Linked List/Q4.cpp | // Loop Start Node of a Loop in LL
#include<iostream>
#include<map>
using namespace std;
class Node{
public:
int data;
Node* next;
Node(int value){
this->data = value;
this->next = NULL;
}
};
Node* firstLoop(Node* noob, Node* pro){
while(noob!= pro){
pro= pro->... | ALGO | 0.999934 | 3.497909 |
2e0affcb-475f-4972-aa41-f90d32386460 | equetzal/competitiveProgramming | Other OJ Problems/UVa/p10141 - Request for Proposal.cpp | //UVa p10141 - Request for Proposal
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef long long int lli;
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);
int main(){
int n,p,r,caseId=1;
double price;
string s;
bool isFirst = true;
while(cin >> n >> p){
if(n == 0 && p == ... | ALGO | 0.971334 | 3.311195 |
5718d8b4-8d5d-4ec9-a542-30d233e0ea75 | Coolboymannu/DSA-2nd-sem | project 2nd sem 14 question/4_sorting_method.cpp | // 4. WAP in C++ to perform bubble, insertion, counting and selection sorts.
#include<iostream>
#include<algorithm>
using namespace std;
void count_sort(int arr[], int size) {
int maxele = arr[0];
for (int i = 0; i < size; i++) {
maxele = max(maxele, arr[i]);
}
int count_array[maxele + 1] = {0};... | ALGO | 0.999964 | 4.108828 |
83518ce9-2123-43ba-8716-9088d9c97750 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/Mixtral/top0-100/find-all-possible-recipes-from-given-supplies-Solution.findAllRecipes/177913_Exec_Code_Overflow.cpp | tt_cmap8_validate( FT_Byte* table,
FT_Validator valid )
{
FT_Byte* p = table + 4;
FT_Byte* is32;
FT_UInt32 length;
FT_UInt32 num_groups;
if ( table + 16 + 8192 > valid->limit )
FT_INVALID_TOO_SHORT;
length = TT_NEXT_ULONG( p );
if ( table + len... | ALGO | 0.995823 | 3.248393 |
aa699119-3e98-47f7-8e5b-f3d4e366b1a7 | TD2106/Competitive-Programming | Random contest/2017 ACM Arabella Collegiate Programming Contest/B.cpp | #include <bits/stdc++.h>
#define bug(x) cout<<#x<<'='<<x<<'\n'
#define tc() int tc;cin>>tc;for(int _tc=0;_tc<tc;++_tc)
#define up(i,l,r) for(int i=l;i<=r;++i)
#define down(i,r,l) for(int i=r;i>=l;--i)
#define fw(file) freopen(file,"w",stdout)
#define fr(file) freopen(file,"r",stdin)
#define reset(x) memset(x,0,sizeof(x... | ALGO | 0.995708 | 3.425377 |
460b7bc6-54cc-4db4-9e51-6b6febbc6c7c | utkarshup32/Leetcode | 0210-course-schedule-ii/0210-course-schedule-ii.cpp | class Solution {
private:
bool dfs(vector<vector<int>>& adj,vector<int>& vis,vector<int>& pathVis,int node,stack<int>& st){
vis[node]=1;
pathVis[node]=1;
for(auto it:adj[node]){
if(!vis[it]){
if(dfs(adj,vis,pathVis,it,st)==true) return true;
}
... | ALGO | 0.999992 | 6.367474 |
e85197a2-a38a-4bae-9f5f-686e7dcd14fa | Hitigerzzz/Data-Structure | c++/Binary Tree Inorder Traversal/main.cpp | #include <iostream>
#include <sstream>
#include <string.h>
#include <strstream>
#include <stack>
using namespace std;
class BTreeNode{
public:
int key;
BTreeNode *left;
BTreeNode *right;
};
//生成二叉树,数据结构ppt
void createBTree(BTreeNode*&BT,string str,int length){
BTreeNode *s[10000];
int top=-1;
BT... | ALGO | 0.999301 | 3.498649 |
e5e0b63f-8589-4bec-b59c-e5b5b77673a0 | Satyajeet5275/Data_Structures_and_Algorithms-Leetcode | 3250-maximum-square-area-by-removing-fences-from-a-field/maximum-square-area-by-removing-fences-from-a-field.cpp | class Solution {
public:
int mod=1e9+7;
int maximizeSquareArea(int m, int n, vector<int>& h, vector<int>& v) {
v.push_back(1);
v.push_back(n);
h.push_back(1);
h.push_back(m);
sort(h.begin(),h.end());
sort(v.begin(),v.end());
unordered_set<int> s1,s2;
... | ALGO | 0.999952 | 5.290927 |
af583f2f-ac0f-47b8-8ca3-995486ad97a3 | andrew-epstein/paq_history | paq1.cpp | /* PAQ1 - File archiver and compressor.
(C) 2002, Matt Mahoney, <EMAIL>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This p... | TOOL | 0.88911 | 3.245996 |
af8e4805-72a2-459d-9353-a80fdd0f5bcf | RodrigoRossetti/URI-OJ | Volume 15 (1500 - 1599)/1573/1573.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int a, b, c, v;
while (1) {
cin >> a >> b >> c;
if (a == 0 & b == 0 && c == 0) break;
v = a*b*c;
cout << int(cbrt(v)) << endl;
}
return 0;
} | ALGO | 0.999957 | 3.654769 |
e5014577-7f2f-4518-ba84-efcf7f370dc2 | ishandutta2007/codeforces | keywet06/normal/17/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int64;
char b[1 << 20];
char n[1 << 20];
int c;
int64 powmod(int64 a, int64 x) {
if (x == 0) return 1;
if (x & 1) return a * powmod(a * a % c, x / 2) % c;
return powmod(a * a % c, x / 2);
}
int main() {
std::cin >> b >> n >> c;
in... | ALGO | 0.999916 | 4.10871 |
183065a1-043e-4b47-bf56-4a82693d50d1 | ShrutiRani7029/SHEET_PLACEMENT | boats_to_save_people.cpp | class Solution {
public:
int numRescueBoats(vector<int>& people, int limit) {
sort(people.begin(), people.end());
int left = 0, right = people.size() - 1;
int boats = 0;
while (left <= right) {
if (people[left] + people[right] <= limit) {
... | ALGO | 0.999995 | 6.152833 |
1c655bc8-f41b-4880-a380-4d7a11891a9d | Kerorohu/PAT_Code | 1065error.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
void er(vector<int>& v, int temp);
int main() {
int n, m;
cin >> n;
int** a = new int* [n];
for (size_t i = 0; i < n; i++)
{
a[i] = new int[2];
cin >> a[i][0] >> a[i][1];
}
cin >> m;
vector<int> v;
int temp;
for (size_t i = 0; i ... | ALGO | 0.99997 | 3.634979 |
439a2108-f2d9-4247-ba5b-75db46d020d2 | McDeevious/Game-COMP710 | source/vector2.cpp | // COMP710 GP Framework 2025
// This include:
#include "vector2.h"
// Local includes:
#include "renderer.h"
// Library includes:
#include <cassert>
#include <cmath>
Vector2::Vector2()
: x(0.0f)
, y(0.0f)
{
}
Vector2::~Vector2()
{
}
Vector2::Vector2(float inx, float iny)
: x(inx)
, y(iny)
{
}
void
Vector2:... | TOOL | 0.858919 | 6.692255 |
e3aa726b-106b-4a43-9cb6-ae79816b8674 | takamtd/deepmimic | bullet3/examples/Utils/b3ResourcePath.cpp | #include "b3ResourcePath.h"
#include "Bullet3Common/b3Logging.h"
#ifdef __APPLE__
#include <mach-o/dyld.h> /* _NSGetExecutablePath */
#else
#ifdef _WIN32
#include <windows.h>
#else
//not Mac, not Windows, let's cross the fingers it is Linux :-)
#include <unistd.h>
#endif
#endif
#include "Bullet3Common/b3FileUtils.h"
#... | TOOL | 0.854281 | 5.425333 |
6a7c7f56-e30e-49a4-8b4e-6a0526a0d55a | GhostridercoinOrg/ghostridercoin | src/key.cpp | #include <key.h>
#include <arith_uint256.h>
#include <crypto/common.h>
#include <crypto/hmac_sha512.h>
#include <random.h>
#include <secp256k1.h>
#include <secp256k1_recovery.h>
static secp256k1_context* secp256k1_context_sign = nullptr;
/** These functions are taken from the libsecp256k1 distribution and are very ... | TOOL | 0.928436 | 7.198978 |
bbd15c37-a14f-4b49-a47e-f3a9a4e35df9 | pranali21pawar/Competitive-Coding | HackerRank/Algorithms/A Very Big Sum.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n;
long long int sum =0 ;
cin >> n;
vector<long long int> arr(n);
for(int arr_i = 0;arr_i < n;arr_i++){
cin >> arr[arr_i];
sum+=arr[arr_i];
}
cou... | ALGO | 0.999241 | 3.698847 |
e7f1282a-f693-4300-b47e-2f391341cc72 | ozzybo/Lightning_Social_Media_Application | 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.998693 | 6.797273 |
547aea9a-5c14-45c3-8148-7fc01f8d5943 | code123321123/C-freelancing | question1.cpp | #include <iostream>
using std::cout;
// Part - A
// m is the size of array strings1 and n is size of array strings2
void duplicates_def(char strings1[][20], char strings2[][20], char[][20] res_string, int m, int n)
{
int res_ind = 0;
for (int i = 0; i < m; ++i)
{
for (int j = 0; j < n; ++j)
... | ALGO | 0.996684 | 4.085908 |
23c1c73d-32f0-48db-a8e4-b2ffae5c117a | Joosunghun/Study | ndb/10/10_3.cpp | // 10_3 ȹ
// N M , ϴ , ⼺ x
// 2 Ϸ , ϳ ־ϰ, ȿ ִ ̿ ΰ ؾ
// ġ ְ ּҷ ϰ
// N, M
// A, B, C -> A B ϴ
// ּڰ
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int n, m; //
int parent[100001]; ... | ALGO | 0.999908 | 4.348289 |
035c6d3a-d2cc-4f05-b0a7-286bb72f0221 | shelltdf/OpenNURBS | opennurbs_planesurface.cpp | /* $NoKeywords: $ */
#include "opennurbs.h"
#if !defined(ON_COMPILING_OPENNURBS)
// This check is included in all opennurbs source .c and .cpp files to insure
// ON_COMPILING_OPENNURBS is defined when opennurbs source is compiled.
// When opennurbs source is being compiled, ON_COMPILING_OPENNURBS is defined
// and t... | TOOL | 0.959881 | 4.165113 |
0239a6fb-6f50-468a-80ea-b53b9db86d9a | bollig/viennacl | examples/tutorial/bandwidth-reduction.cpp | /*
* Tutorial: Matrix bandwidth reduction algorithms
*/
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <deque>
#include <cmath>
#include "viennacl/misc/bandwidth_reduction.hpp"
//
// Part 1: Helper functions
//
// Reorders a matrix according... | ALGO | 0.999992 | 4.192496 |
db45d37a-939e-42ca-b893-eaa978452c9b | Icecubesaad/Uni-shi | DSA/lists/SinglyLinkedList/main.cpp | #include "linkedList.h"
int main() {
LinkedList l1;
l1.insert_at_tail(7);
l1.insert_at_tail(8);
l1.insert_at_head(9);
l1.insert_at_particular_position(2, 10);
l1.delete_from_head();
l1.delete_from_tail();
l1.insert_at_tail(7);
l1.insert_at_tail(8);
l1.insert_at_tail(12);
l1.delete_from_particular_position(3)... | ALGO | 0.996175 | 3.671356 |
4e02acb1-3da2-48b9-8ace-e4208a334b89 | CleMTales/College | Prog II/Lista 2/9.cpp | /*
Progama: Receber um nome e imprimir quantas letras h nele.
Autor: Tales Clemente Matsuda
Data de criao: 12/09/2020
Data de modificao:12/09/2020*/
#include<stdio.h>
#include<locale.h>
#include<stdlib.h>
int nome_Cont(char nome[20])
{
int i=0,letras=0;
for (i=0;i<20;i++)
{
if (nome[i] != 0)
letras++;
else... | TOOL | 0.908384 | 3.729277 |
943f2044-259e-435e-ba2f-51a47959586e | pg1049/geodesic | include/igl/ceil.cpp | template < typename DerivedX, typename DerivedY>
IGL_INLINE void igl::ceil(
const Eigen::PlainObjectBase<DerivedX>& X,
Eigen::PlainObjectBase<DerivedY>& Y)
{
using namespace std;
//Y = DerivedY::Zero(m,n);
//#pragma omp parallel for
//for(int i = 0;i<m;i++)
//{
// for(int j = 0;j<n;j++)
// {
// Y... | ALGO | 0.988756 | 5.300989 |
c82b80c2-c575-4f98-81cc-db46cad39391 | danieltrt/SBFL | results/java/COIN_GAME_WINNER_EVERY_PLAYER_THREE_CHOICES.cpp | bool f_filled ( int x , int y , int n ) {
bool dp [ n + 1 ] ;
memset ( dp , false , sizeof ( dp ) ) ;
dp [ 0 ] = false ;
dp [ 1 ] = true ;
for ( int i = 2 ;
i <= n ;
i ++ ) {
if ( i - 1 >= 0 && dp [ i - 1 ] == false ) {
dp [ i ] = true ;
}
else if ( i - x >= 0 && dp [ i - x ] == false ) ... | ALGO | 0.999427 | 3.844812 |
ce648739-9688-465f-b591-682897134ed1 | covy-gyu/CodingTest | 프로그래머스/2/12949. 행렬의 곱셈/내풀이.cpp | #include <vector>
using namespace std;
vector<vector<int>> solution(vector<vector<int>> arr1, vector<vector<int>> arr2) {
size_t rows = arr1.size();
size_t cols = arr2[1].size();
size_t inner = arr2.size();
// ʱȭ
vector<vector<int>> answer(rows, vector<int>(cols, 0));
//
for (size_t i = 0; i < rows; i++)... | ALGO | 0.999889 | 5.595877 |
3efbc223-8248-4f84-83a2-7997a4403431 | ishandutta2007/codeforces | jhin/normal/1038/B.cpp | // system.cout(translate *from glut);
#include <bits/stdc++.h>
using namespace std;
#define f for(int i=0;i<n;i++)
const int mod=1e9+7;
vector<int> p;
int ho,mi,se;
void fix_time()
{ if(se>59)mi+=se/60,se=se%60;if(se<0)se+=60,mi--;
if(mi>59)ho+=mi/60,mi=mi%60;if(mi<0)mi+=60,ho--;
if(ho<0)ho+=24;if(ho>24)ho... | ALGO | 0.999887 | 3.861422 |
3d2df7c6-e4c9-4e14-b67b-1f63d894bd75 | Dipto2611/OOPS | OOPS_Codes/rank.cpp | #include <iostream>
using namespace std;
class Stud{
public:
string name;
int rank;
void getData(){
cout<<"Enter name:";
cin>>name;
cout<<"Enter rank:";
cin>>rank;
}
};
int main(){
Stud s[5],temp;
for(int i=0;i<5;i++){
s[i].getData();
}
for(int i=0;i<5;i++){
... | ALGO | 0.996622 | 3.225135 |
77a75272-bf6a-446d-904c-3f419de68ea9 | cybersleuth0/recipe_book_API | 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.998756 | 6.772262 |
6b0ccd98-457d-4e64-9a3c-ce426e5591f0 | glKarin/idtech4amm_quake4_sdk | neo/idlib/hashing/CRC32.cpp | #include "../precompiled.h"
#pragma hdrstop
#define CRC32_INIT_VALUE 0xffffffff
#define CRC32_XOR_VALUE 0xffffffff
#ifdef CREATE_CRC_TABLE
static unsigned int crctable[256];
/*
Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x... | ALGO | 0.993457 | 5.25986 |
bc47f077-90a5-4744-b8f8-5bb371982211 | soso1461/TIL_Today-I-Learn | C++2022/BaekJoon/BaekJoon/Baek2475_231024.cpp | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int A, B, C, D, E;
cin >> A >> B >> C >> D >> E;
int sum = 0;
sum = pow(A, 2) + pow(B, 2) + pow(C, 2) + pow(D, 2) + pow(E, 2);
sum %= 10;
cout << sum << '\n';
} | ALGO | 0.999892 | 4.07624 |
78c4ccca-50ee-40fe-8fb1-39b1a05be91c | danny911kr/data-structure-practice-with-cpp | Stack Calculator/Main.cpp | // 5.cpp : ܼ α մϴ.
//
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include "mystack.h"
using namespace std;
bool isOperator(char ch);
int performOperation(int op1, int op2, char op);
int getWeight(char ch);
void infix2postfix(char infix[], char postfix[], int size);
int main()
... | ALGO | 0.998001 | 4.041523 |
043e87bd-8a1e-49ba-bfb5-f26dc94bfd24 | liwei2088/oi | 计蒜客/01基础算法/04枚举算法/T1199.cpp | #include <iostream>
using namespace std;
int n, k, a[1005];
int main() {
cin >> n >> k;
for (int i = 1; i <= n; i++) cin >> a[i];
for (int i = 1; i <= n; i++)
for (int j = i + 1; j <= n; j++)
if (a[i] + a[j] == k) {
cout << "yes";
return 0;
}
... | ALGO | 0.999967 | 4.294652 |
2706e036-be1f-42b6-a14d-f8c06d4adfef | dolyaAl/programming-autumn-2020-hw | 2020-09-18-hw1/task5/task5.cpp | #include<iostream>
#include<clocale>
using namespace std;
int main(int argc, char* argv[])
{
setlocale(LC_ALL, "Russian");
int a = 0;
int b = 0;
int c = 0;
cout << " " << endl;
cout << ">>";
cin >> a;
int s = sqrt(a);
while (c < s)
{
++c;
if (a % c == 0)
{
if (c == s)
{
++b;
}
else
{... | ALGO | 0.999453 | 3.194674 |
aa2bef94-b533-4700-80bb-41e489f66109 | aadi2305/Competative-Coding | CodeChef/Practice/CHRL4.cpp | #include <iostream>
#include <vector>
#include <map>
#include <list>
#define ll long long
using namespace std;
int main()
{
ll N, K;
cin >> N >> K;
ll specialNo[N];
for(int i = 0; i <N; i++)
{
ll input;
cin >> input;
specialNo[i] = input;
}
} | ALGO | 0.999894 | 3.467112 |
4caa65c0-d0a6-4d3d-86e2-7d53766d93db | LeoMcBills/100_days-ML | c_plusplus/macros/sintab2.cpp | // Creates a sine function table
#include <iostream>
#include <iomanip>
#include <cmath>
#define PI 3.1415926536
#define START 0.0
#define END (2.0 * PI)
#define STEP (PI / 8.0)
#define HEADER (std::cout << "\n *************** Sine Function Table *************\n")
int main()
{
... | ALGO | 0.94279 | 5.125432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.