uuid stringlengths 36 36 | repo_name stringlengths 5 123 | relative_path stringlengths 5 4k | content stringlengths 33 2.85M | category stringclasses 6
values | algo_rel_score float64 0.85 1 | quality_score float64 3 8.76 |
|---|---|---|---|---|---|---|
feed09d6-d26b-41f6-ab28-3a4821f22cae | NVlabs/E3SM | components/eamxx/src/physics/p3/eamxx_p3_run.cpp | #include "physics/p3/eamxx_p3_process_interface.hpp"
namespace scream {
void P3Microphysics::run_impl (const double dt)
{
// Set the dt for p3 postprocessing
p3_postproc.m_dt = dt;
// Assign values to local arrays used by P3, these are now stored in p3_loc.
Kokkos::parallel_for(
"p3_main_local_vals",
... | ALGO | 0.993675 | 4.830114 |
afb87682-2b4d-47f4-9527-05c45041ba06 | AloshkaD/Path_planning_self-driving_car | src/Eigen-3.3/bench/benchEigenSolver.cpp |
// g++ -DNDEBUG -O3 -I.. benchEigenSolver.cpp -o benchEigenSolver && ./benchEigenSolver
// options:
// -DBENCH_GMM
// -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/QR>
#in... | TOOL | 0.98764 | 5.772194 |
7d0e334b-8cac-4878-8aca-2db7f848b19e | tejaskaher0/DSA-Apna-College | Day 007/bitwise_and_or_xor_operators.cpp | #include <iostream>
using namespace std;
int main() {
int a = 3, b = 7; // 3 = 011 & 7 = 111
cout << (a & b) << endl; // Bitwise AND Operator
cout << (a | b) << endl; // Bitwise OR Operator
cout << (a ^ b) << endl; // Bitwise XOR Operator [Exclusive OR]
return 0;
} | ALGO | 0.959698 | 6.034856 |
5c98deb4-c479-4bcb-9c06-0001e1f8a4c6 | sarvex/leetcode-algol | solution/2500-2599/2543.Check if Point Is Reachable/Solution.cpp | class Solution {
public:
bool isReachable(int targetX, int targetY) {
int x = gcd(targetX, targetY);
return (x & (x - 1)) == 0;
}
}; | ALGO | 0.999934 | 5.73896 |
d81808ed-b336-4de4-babd-f77f952096ed | PierreRochard/enterprisebitcoin | src/test/fuzz/crypto_diff_fuzz_chacha20.cpp | #include <crypto/chacha20.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <cstdint>
#include <vector>
/*
From https://cr.yp.to/chacha.html
chacha-merged.c version 20080118
D. J. Bernstein
Public domain.
*/
typedef unsigned int u32;
typedef unsigned char u... | TEST | 0.94596 | 5.820527 |
93f33a29-bbac-4126-8ad3-d1faa04807c2 | sun1f/ccmslam_modified | cslam/thirdparty/g2o/g2o/core/hyper_graph.cpp | #include "hyper_graph.h"
#include <assert.h>
#include <queue>
namespace g2o {
HyperGraph::Vertex::Vertex(int id) : _id(id)
{
}
HyperGraph::Vertex::~Vertex()
{
}
HyperGraph::Edge::Edge(int id) : _id(id)
{
}
HyperGraph::Edge::~Edge()
{
}
void HyperGraph::Edge::resize(size_t size)
{
... | ALGO | 0.957924 | 5.601523 |
b7c195e4-e5e3-48e3-a9a6-3da8ef235469 | Singularity-v/GP-project1 | cocos2d/cocos/3d/CCOBB.cpp | #include "3d/CCOBB.h"
NS_CC_BEGIN
#define ROTATE(a,i,j,k,l) g=a.m[i + 4 * j]; h=a.m[k + 4 * l]; a.m[i + 4 * j]=(float)(g-s*(h+g*tau)); a.m[k + 4 * l]=(float)(h+s*(g-h*tau));
static Mat4 _getConvarianceMatrix(const Vec3* vertPos, int vertCount)
{
int i;
Mat4 Cov;
double S1[3];
double S2[3][3];
S... | ALGO | 0.998341 | 6.076499 |
b1e3a27f-7775-4ace-8481-3376c52c46a2 | andriidem308/python_practice | programming_hw_4s/tasks_with_eolymp_tags/t_9_8_(eolimp_1524).cpp | #include<iostream>
#include<cstring>
using namespace std;
#define MAX 71
int m[MAX][MAX];
int main(){
int n, t, p;
int tests;
memset(m,0,sizeof(m));
for(int i = 0; i < MAX; i++) m[1][i] = m[i][0] = 1;
for(int i = 2; i < MAX; i++)
for(int j = 1; j < MAX; j++)
m[i][j] = m[i][j-1] + m[i-1][j];
scanf("%d",&... | ALGO | 0.999546 | 3.507154 |
d5969fc7-60a9-4afd-af61-4c6e5354e07e | xnmng/LeetCode | 2328-number-of-increasing-paths-in-a-grid/2328-number-of-increasing-paths-in-a-grid.cpp | class Solution {
private:
int dfs(vector<vector<int>>& grid, vector<vector<int>>& dp, int i, int j) {
auto modulo{static_cast<int>(1e9 + 7)};
// default path with length 1 (grid[i][j] itself) is strictly increasing
auto ans{1};
if (dp[i][j] == -1) {
if (i+1 < grid.size() ... | ALGO | 0.999999 | 6.461969 |
6a85c117-bed8-45cb-a014-5a7c56b2e1fa | TamarElitzur/Cpp_HomeWork2 | HomeWork2/HomeWork2/Board.cpp | #include <iostream>
#include "Board.h"
using namespace std;
// Constructor
Board::Board() {
matrix = new char* [SIZE];
for (int i = 0; i < SIZE; i++) {
matrix[i] = new char [SIZE];
}
initializeBoard();
}
// Copy Constructor
Board::Board(const Board& other) {
matrix = new char* [SIZE];
... | ALGO | 0.969473 | 5.829501 |
46d84623-0de2-4d9d-9a96-762dffa0be21 | mcbapo/mpsdyn | src/programs/banulsm/effectiveH/spectrumEffectiveH.cpp |
#include <math.h>
#include <iomanip>
#include "MPS.h"
#include "Contractor.h"
#include "Properties.h"
#include "IsingHamiltonian.h"
#include "MPOMultiplierHermitian.h"
#include "SpinMPO.h"
#include <cmath>
#include <unistd.h>
#include "misc.h"
//#include "quicksort.h"
using namespace std;
using namespace shrt;
#d... | ALGO | 0.972742 | 4.202746 |
2b94b72c-a42b-4b90-84fc-53db2fda55ea | bjornheidar/aflv | 1/main.cpp | #include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
using namespace std;
int main(){
int n,p, q;
cin >> n;
cin >> p;
cin >> q;
if(((p+q)/n % 2) == 0)
cout << "paul" << endl;
else
cout << "opponent" << endl;
... | ALGO | 0.999862 | 3.37404 |
8b8fce6b-f9db-42ba-8184-e99cb8185737 | NiuTrans/NiuTrans.SMT | src/NiuTrans.Decoder/OurDecoder_SCFG_Tree.cpp | /*
* $Id:
* tree-parsing (or tree-based decoding); OurDecoder_SCFG_Tree.cpp
*
* $Version:
* 0.1.0
*
* $Created by:
* Tong Xiao (email: <EMAIL>) 2012/12/11
*
* $Last Modified by:
*
*/
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "Model.h"
#include "OurDecoder_SCFG.h"
namespace smt {
... | ALGO | 0.998729 | 3.829472 |
150a0a1d-4ed0-422a-b76f-4cd0b2bf1b2d | mahadodla4/GFG_solutions | Basic/Reverse a String/reverse-a-string.cpp | //{ Driver Code Starts
//Initial Template for C++
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution
{
public:
string reverseWord(string str)
{
reverse(str.begin(),str.end());
return str;
}
};
//{ Driver Code Starts.
int... | ALGO | 0.99954 | 6.063393 |
944281e4-8729-42f1-9c91-f961f5c9b6f7 | hadesangel/llvm-obfuscator | lib/CodeGen/MachineVerifier.cpp | #include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/EHPersonalities.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/LiveStackAnalysis.h"
#include "llvm/CodeGen/LiveVariables.h"
#inc... | TOOL | 0.901336 | 7.907187 |
ed618abc-2d39-4de9-ad41-50470ca79af6 | sayali1998/LeetcodeProblems | LongestPalindrome.cpp | class Solution {
public:
int longestPalindrome(string s) {
std::map<char, int> m;
int even = 0, odd = 0;
for(int i = 0; i<= s.length(); i++){
if(m.find(s[i]) != m.end())
m[s[i]] = m[s[i]] + 1;
else
m[s[i]] = 1;
}
for(aut... | ALGO | 0.999819 | 5.279457 |
10fb12eb-b0c9-4c06-9712-b0f0e0c885b8 | hjiang13/LLMs-in-IR | POJ-104/10/2100.cpp | #include <iostream>
using namespace std;
const int maxn=30;
int h[maxn];
int f[maxn];
int main()
{
int n;
// freopen("readin","r",stdin);
cin >> "%d",&n);
int i;
for(i=1; i<=n; i++)cin >> "%d",h+i);
f[1]=1;
int j;
int max=0;
for(i=2; i<=n; i++)
{
max=0;
for(j=1; j<=i-1; j++)if(h[i]<=h[j])
{
if(max<f[j])
max=f[j];
}
f[i... | ALGO | 0.999853 | 3.696079 |
daa39b93-7e75-4254-8af2-d84188f20f52 | zfa07/Killyouss | Engine/Plugins/Experimental/ProxyLODPlugin/Source/ThirdParty/UVAtlasCode/UVAtlas/isochart/isochartutil.cpp | #include "pch.h"
#include "isochartutil.h"
using namespace Isochart;
using namespace DirectX;
namespace
{
static inline bool CalculateOverlappedSegmentsIntersection(
float a0, float a1,
float a3, float a4,
float& result)
{
result = 0;
if (a0 > a1)
{
... | ALGO | 0.999285 | 5.917513 |
1a83cf68-779e-4466-be1d-85a6fba914fb | masud-rana44/BeeCrowd | 1157.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for(int i = 1; i <= n; i++){
if(n%i == 0) cout << i << endl;
}
return 0;
} | ALGO | 0.999937 | 4.282054 |
c9718089-06e2-44d5-b5a6-92936b839806 | backf1re/BCZ-core | src/primitives/block.cpp | #include "primitives/block.h"
#include "hash.h"
#include "script/standard.h"
#include "script/sign.h"
#include "tinyformat.h"
#include "utilstrencodings.h"
#include "util.h"
#include "crypto/Lyra2Z/Lyra2Z.h"
#include "crypto/Lyra2Z/Lyra2.h"
#include "main.h"
uint256 CBlockHeader::GetHash() const
{
if (nVersion <... | ALGO | 0.973343 | 6.235681 |
2025d601-85f0-47c8-a15a-65e01566fe3a | suman-2902/gsocDsa | classwork/Q4.cpp | //pallindrome number
class Solution {
public:
bool isPalindrome(int x) {
if(x < 0)
return false;
long int num=x , rev = 0, rem = 0;
while(num!= 0)
{
rem = num%10;
cout<<rem<<" ";
rev = rev*10 + rem;
... | ALGO | 0.999743 | 5.239074 |
f1214cb7-f7d2-48c2-a99d-b10bac30c1f5 | reckyy/kyopro-tessoku | editorial/final/cpp/answer_C13.cpp | #include <iostream>
#include <map>
using namespace std;
// a の b 乗を m で割った余りを返す関数
long long Power(long long a, long long b, long long m) {
long long p = a, Answer = 1;
for (int i = 0; i < 30; i++) {
int wari = (1 << i);
if ((b / wari) % 2 == 1) {
Answer = (Answer * p) % m;
}
p = (p * p) % m;
}
return An... | ALGO | 0.999972 | 4.232759 |
672e7340-38ed-4de4-9468-3635ab7e473e | mehedynoman11/Cpractises-main-main1 | class/arrayInser.cpp | #include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int arr[N];
for(int i=0;i<N;i++) {
cin >> arr[i];
}
int pos, value;
cin >> pos >> value;
for(int i=0;i>=pos + 1;i--){
arr[i] = arr[i - 1];
}
arr[pos] = value;
for (int i = 0; i < N;... | ALGO | 0.999953 | 3.703022 |
b44e35ef-9a44-42a8-9833-a04b41881d8e | sungzh/leetcode | LeetCode/695. Max Area of Island.cpp | /*
* Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.
*
* Find the maximum area of an island in the given 2D array. (If there is no island, the maximum... | ALGO | 0.999904 | 6.635427 |
0633eecf-8401-4386-bf17-48aaf35ab5bc | BiTaJIb4iK/Lab4.2_Queues | #5.cpp | class Solution {
public:
vector<int> movesToStamp(string stamp, string target) {
int m = stamp.size(), n = target.size();
vector<bool> stamped(n, false);
vector<int> result;
auto canStamp = [&](int index) -> bool {
bool stampedOnce = false;
for (int i = 0; i ... | ALGO | 0.99995 | 6.032727 |
028a33f2-126d-4ac3-809d-53200fdf3b83 | triplemzim/competitive_programming | uva/10763 foreign exchange.cpp | #include<iostream>
#include<cstdio>
#include<map>
using namespace std;
#define mp make_pair
int main()
{
map<pair<int,int>,bool> m;
int n,total;
int x,y;
while(scanf("%d",&n)==1 && n)
{
total=0;
for(int i=0;i<n;i++)
{
cin>>x>>y;
if(m.find(mp(y,x))==m.end())
{
m[mp(x,y)]=true;
total++;
}... | ALGO | 0.998622 | 3.722394 |
6b881823-673b-47a9-8ece-7c9f15217c06 | KatsuyaKikuchi/ProgrammingContest | AtCoder/Virtual/20200601/E.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pll;
#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(10)
const ll MOD = 1000000007;
const ll INF = (ll) 1e15;
bool U[105];
pll A[105];
pll B[105];
int main() ... | ALGO | 0.999903 | 4.149421 |
d0cb9279-3c97-442b-a18a-a3c1577cb22a | kbakdev/codeforces | code/array_coloring14.cpp | #include<iostream>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
int main() {
fast;
int t, n, val;
bool isOddSum;
cin >> t;
while(t--) {
cin >> n;
isOddSum = false; // Reset the flag for each test case
for(int i = ... | ALGO | 0.999354 | 6.189828 |
a662170a-7755-472a-9a4e-f9a49722cb9d | gitJaesik/algorithm_archive | codility/distinct.cpp | #include <iostream>
#include <vector>
#include <set>
using namespace std;
int solution(vector<int> &A)
{
set<int> B;
for (const auto& a: A) {
B.insert(a);
}
return B.size();
}
int main() {
vector<int> A {2, 1, 1, 2, 3, 1};
cout << solution(A) << endl;
return 0;
}
| ALGO | 0.99852 | 5.221512 |
b144f9cf-21ca-4e74-916c-7a6ed1a2c611 | Bryan-cg/fdpp-fmm | example/cpp-api/fmm_wrap.cpp | #include "fmm_wrap.hpp"
fmm_wrap::fmm_wrap(char *ubodtFile, const Network &network, const NetworkGraph &networkGraph) {
std::string ubodtFile_str(ubodtFile);
SPDLOG_INFO("Reading UBODT file");
this->ubodt = UBODT::read_ubodt_csv(ubodtFile_str);
this->fmm_config = new FastMapMatchConfig(8, 300, 50, 0);... | TOOL | 0.940203 | 5.128579 |
097463e3-3bfc-44f8-97ee-710ead449d5a | sarvex/leetcode-boo | solution/1300-1399/1347.Minimum Number of Steps to Make Two Strings Anagram/Solution.cpp | class Solution {
public:
int minSteps(string s, string t) {
int cnt[26]{};
for (char& c : s) ++cnt[c - 'a'];
int ans = 0;
for (char& c : t) {
ans += --cnt[c - 'a'] < 0;
}
return ans;
}
}; | ALGO | 0.999993 | 6.125963 |
e3277528-5d40-41ac-b098-1b247147fb95 | LanpingTech/CSANMT | mosesdecoder/moses/FF/LexicalReordering/LRModel.cpp | #include "LRModel.h"
#include "moses/Range.h"
#include "moses/Bitmap.h"
#include "moses/InputType.h"
#include "HReorderingForwardState.h"
#include "HReorderingBackwardState.h"
#include "PhraseBasedReorderingState.h"
#include "BidirectionalReorderingState.h"
#include "SparseReordering.h"
namespace Moses
{
bool
IsMonot... | CONFIG | 0.985329 | 4.385217 |
55336cd1-bb31-44bc-8f95-7c5d1b03d08d | NikitaUssyukin/PP1_2024_Summer | Lectures/G1/Week5/L1/STL_containers/map_2_2_3.cpp | #include <iostream>
#include <map>
using namespace std;
int main() {
map<string, int> m;
int n;
cin >> n;
for(int i = 0;; ++i) {
// here
// output code
cout << "\n----------\n";
cout << "i: " << i << endl;
cout << "i < n: " << (i < n) << endl;
cout << ... | ALGO | 0.967084 | 3.907468 |
d9c9b6e3-7bc4-4d75-ad81-1782efe96b69 | sjj118/OI-Code | UOJ/UTR2/A/code.cpp | #include<iostream>
#include<cstdio>
#define rg register
#define rep(i,x,y) for(rg int i=(x);i<=(y);++i)
#define per(i,x,y) for(rg int i=(x);i>=(y);--i)
using namespace std;
const int N=1e5+10,M=1e6;
int n,f[N],sta[N],top,a[N],lst[N];
struct Graph{
int tot,head[N],to[M],next[M],deg[N];
void ins(int a,int b){to[++tot]=... | ALGO | 0.999994 | 3.557774 |
855a21d1-1900-470d-9465-4598b344459b | Barlan1/cpp | umap_wordFreq_stringstream.cpp | // finding freq of every word using unordered_map
#include<bits/stdc++.h>
using namespace std;
void freqWord(const string &str)
{
unordered_map<string, int> FW;
stringstream s(str);
string word;
while( s >> word)
FW[word]++;
unordered_map<string, int>::iterator itr;
for( itr= FW.begin(); itr !=FW.end... | ALGO | 0.996705 | 4.87403 |
e5a605d7-b78e-45af-920d-e39cedbd53a5 | shreyansh2000rawat/Datastructure-and-Algorithm | TREEand BST/Print Postorder traversal from given Inorder and Preorder traversals_gfg/main.cpp | #include <iostream>
using namespace std;
int search(int arr[], int x, int n)
{
for (int i = 0; i < n; i++)
if (arr[i] == x)
return i;
return -1;
}
void printPostOrder(int in[], int pre[], int n)
{
// The first element in pre[] is always root, search it
// in in[] to find left and right subtrees
int root = se... | ALGO | 0.999982 | 5.44708 |
4e0b3150-7dfc-4d35-9fd3-e65ee1a77714 | ishandutta2007/codeforces | pavel.savchenkov/normal/576/B.cpp | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <utility>
#include <cstdlib>
#include <memory>
#include <queue>
#include <cassert>
#include <cmath>
#include <ctime>
#include <complex>
#include <bitset>
#include <fst... | ALGO | 0.999986 | 3.374974 |
944db835-d657-4aea-a5ed-a4022bfe55db | afkyyd/engine | Engine/Source/ThirdParty/PhysX/PhysX_3.4/Source/PhysXExtensions/src/ExtDistanceJointSolverPrep.cpp | #include "foundation/PxSimpleTypes.h"
#include "ExtDistanceJoint.h"
namespace physx
{
namespace Ext
{
PxU32 DistanceJointSolverPrep(Px1DConstraint* constraints,
PxVec3& body0WorldOffset,
PxU32 maxConstraints,
PxConstraintInvMassScale &invMassScale,
const void* constantBlock,
const PxTransform& bA2w,
const... | ALGO | 0.961207 | 6.530216 |
78605817-44cd-4395-95ec-ef89b9086526 | aex-tmp/platform_frameworks_av | media/libaudioprocessing/AudioResamplerCubic.cpp | #define LOG_TAG "AudioResamplerCubic"
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include <log/log.h>
#include "AudioResamplerCubic.h"
namespace android {
// ----------------------------------------------------------------------------
void AudioResamplerCubic::init() {
memset(&left, 0, size... | ALGO | 0.926321 | 6.907433 |
260d0924-b883-4b0e-84f9-b395563125c4 | shenlan2017/calibration | lidar2ins_ros_ws/src/fast_gicp/thirdparty/Eigen/unsupported/doc/examples/PolynomialUtils1.cpp | #include <unsupported/Eigen/Polynomials>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
Vector4d roots = Vector4d::Random();
cout << "Roots: " << roots.transpose() << endl;
Eigen::Matrix<double,5,1> polynomial;
roots_to_monicPolynomial( roots, polynomial );
cout << "Polynomial:... | ALGO | 0.997802 | 4.015535 |
55733a9f-2b6c-4071-a913-8087dea60f75 | zwkcoding/data_structure | c++/string/3_Longest Substring Without Repeating Characters /main2.cpp |
#include "../../include/base.h"
// 调试开关
// #define __tmain
#ifdef __tmain
#define debug cout
#else
#define debug 0 && cout
#endif // __tmain
/// Time Complexity: O(n^2)
/// Space Complexity: O(n)
class Solution {
public:
int lengthOfLongestSubstring(string s) {
int ans = 0;
if(s.size() == 0) re... | ALGO | 0.999442 | 5.57491 |
b6697028-2b60-4e7f-8e1c-20edf8214713 | MorolShohan/Data-Structure | problem3.cpp | #include<iostream>
using namespace std;
void display(int arr[], int size)
{
for(int i=0;i<size;i++)
{
cout<<arr[i]<<" ";
}
}
int main()
{
int numbers[5]={10,20,30,40,50};
cout<<numbers[0]<<end;
cout<<numbers[4]<<end;
display(numbers,5);
}
| ALGO | 0.967931 | 3.652106 |
f4006d90-cf31-4149-a8ad-26899d326ce1 | SudoBobo/OrdinaryDEsolver | systemMakers/GalerkinSystemMaker.cpp | #include "GalerkinSystemMaker.h"
#include <cmath>
#include "MyMath.h"
GalerkinSystemMaker::GalerkinSystemMaker(Problem * problem,
Conditions * conditions, Stream *stream,
const int k)
:SystemMaker(problem, conditions, stream, k)
{
}
double GalerkinSystemMaker::dU(const int l, const int j,
... | ALGO | 0.983033 | 4.088473 |
f8b56435-0ea0-4f39-bcc1-0cb1d365e086 | KaiEureka/Code-Template | 并查集DSU.cpp | #include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <queue>
#include <stack>
#include <list>
#define int long long
#define i32 signed
#define endl '\n'
... | ALGO | 0.999699 | 3.640291 |
5cf86d36-b9f3-4ded-af57-186f28f6b8a4 | Chan531/BaekJoon_Online_Judge | 장신구명장임스.cpp | #include <iostream>
#include <algorithm>
using namespace std;
int p, n, ans, arr[1010];
void input()
{
cin >> p >> n;
for (int i = 0; i < n; i++) cin >> arr[i];
}
void solution()
{
sort(arr, arr + n);
for (int i = 0; i < n; i++)
{
if (p >= 200) break;
ans++;
p += arr[i];
}
cout << ans;
}
void solve... | ALGO | 0.999267 | 3.535128 |
d6b597e3-014d-45cf-beba-4fbf3fb3053a | rishita3003/Introduction-To-AI-Lab | Lab 1- 8 puzzle/Rishita_Agarwal_220150016_Lab1_Final.cpp | #include <bits/stdc++.h>
#define ll long long
#define vll vector<long long>
using namespace std;
#define N 3
#define pb push_back
using namespace std::chrono;
class Node{
public:
vector<vll> init;
ll fn;
ll gn;
Node(){
gn=0;
fn=0;
}
};
class puzzle_8{
public:
set<pair<v... | ALGO | 0.999805 | 3.065865 |
63980135-5686-497d-a5c1-9bd84e33bb9c | darshsingh116/leetcode | my-folder/problems/reverse_nodes_in_k-group/solution.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* reverse(Lis... | ALGO | 0.999997 | 5.73609 |
99c9e0b1-2fc1-463e-8a2b-396703e9e556 | srnit/codeon | codechef programs/mad.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long int a,b;
cin>>a>>b;
////////////////
if(a%2==0)
{
long long int result=0;
for(long long int i=a+1;i<=b;)
{if(a%2!=0)
result+=a;
i=i+2;
}//1.if
}//forloop1
else if(a%2!=0)
{
long long int result=0;
for(long long int i=a;i<=b;)
{
if(a%2!=0)
result+=a;
i=... | ALGO | 0.999196 | 3.229484 |
62d79801-4001-4ca5-826e-6362148aa114 | unswdb/hyper-k-core | src/Hypergraph.cpp | //
// Created by _ on 21/7/2023.
//
#include <fstream>
#include <algorithm>
#include <sstream>
#include <queue>
#include "Hypergraph.h"
std::pair<std::size_t, std::size_t> Hypergraph::getEdges(std::size_t node_id) const {
return {nodes_edge_nvertx_offset[node_id - 1], nodes_edge_nvertx_offset[node_id]};
}
std::s... | ALGO | 0.982012 | 4.516173 |
01348611-9e9e-4ae0-bd3b-757348dcf979 | ishandutta2007/codeforces | enkognit/normal/1260/A.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("-O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#define ll long long
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define pll pair<ll,ll>
#define pb push_back
#define pii pair<int,int>
using namespace std;
const ll... | ALGO | 0.999942 | 3.904341 |
d3ce7ed6-a149-4adc-b4f7-5eb431c6f2a0 | developer-hajun/-algorithm | external.cpp |
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
using namespace std;
void insertionSort(std::vector<int>& arr) {
int n = arr.size();
for (int i = 1; i < n; i++) {
int key = arr[i];
int j = i - 1;
while (j >= 0 && arr[j] ... | ALGO | 0.999945 | 4.700231 |
bd1f7a9d-2787-4ff0-8ae7-1b814745dd62 | PinataMostGrim/hashutil-c | etc/shift.cpp | #include <stdio.h>
#include <stdint.h>
typedef uint8_t uint8;
typedef uint32_t uint32;
int main()
{
// Reverse the order of the four byte blocks in 'x'
uint32 x = 0b00001000000001000000001000000001;
// Option 1
{
uint32 result = ((0b11111111000000000000000000000000 & x) >> 24)
| (... | ALGO | 0.997847 | 4.418756 |
46ab854d-897a-4306-a75c-4342f649ae34 | seoeunseol/BOJ-step-cpp | 06_advanced_1/2941.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
string CroatiaWord;
cin >> CroatiaWord;
int count = 0;
for (int i = 0; i < CroatiaWord.length(); i++) {
count++;
if ("c=" || "c-" || "dz=" || "d-" || "lj" || "nj" || "s=" || "z=") {
}
if ('c' == CroatiaWord[i]) {
if ('=' == Croat... | ALGO | 0.999063 | 3.382938 |
e91a85a9-88a0-4cef-bcb9-185b4423aace | kmjp/procon | srm/tco/tco21_2a/TwoPolarStations.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<to;x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#defin... | ALGO | 0.999937 | 4.168707 |
ff928e5b-63f3-4ed1-a194-8715495f2c51 | rlewkowicz/opencvwithmodifiedsamples | modules/dnn/src/caffe/caffe_importer.cpp | #include "../precomp.hpp"
#ifdef HAVE_PROTOBUF
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <google/protobuf/message.h>
#include <google/protobuf/text_format.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include "caffe_io.hpp"
#endif
namespace cv {
namespace dnn ... | TOOL | 0.891069 | 7.750535 |
5e913a86-e367-4c2d-ade9-72737d128c36 | diesarrollador/University-1st-2nd-3rd-Years | Semestre1-ParteB/sem2prob21.cpp | #include<iostream>
#include<stdlib.h>
#include<locale.h>
using namespace std;
int main(){
setlocale(LC_ALL,"spanish");
int dia=0;
cout<<"elija un da de la semana a travs de un nmero"<<endl;
cout<<"1)lunes"<<endl;
cout<<"2)martes"<<endl;
cout<<"3)miercoles"<<endl;
cout<<"4)jueves"<<endl;
cout<<"5)viernes"<<endl;... | TOOL | 0.98446 | 3.050627 |
5e803fd4-db47-4cb5-be53-4068ab62920a | LSH3333/PS | baekjoon/2212.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n,k;
vector<int> v;
vector<int> dis;
int main()
{
cin >> n >> k;
v.resize(n);
for(int i = 0; i < n; i++)
cin >> v[i];
sort(v.begin(), v.end());
for(int i = 1; i < n; i++)
{
int sub = v[i] - v[... | ALGO | 0.99996 | 3.562712 |
baa9c19e-a306-4a36-bb13-710271ed29e2 | mr-jestin-roy/LeetCode-TaskList | LeetCode/LinkedLists/Merge K Lists.cpp | class Solution
{
public:
ListNode mergeTwoLists(ListNode l1, ListNode *l2)
{
if (NULL == l1)
return l2;
else if (NULL == l2)
return l1;
if (l1->val <= l2->val)
{
l1->next = mergeTwoLists(l1->next, l2);
return l1;
}
e... | ALGO | 0.999833 | 5.940582 |
685cde32-9163-4a3b-a738-392d9f4a57e7 | a7med7amed7/Problem-Solving | CP/CodeChef/stack/1.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define f(i, a, n) for (int i = (a); i <= (n); i++)
#define ff first
#define ss second
void solve()
{
int n;
cin >> n;
int arr[n];
vector<int>... | ALGO | 0.999972 | 5.041033 |
b545832b-e765-4794-85a4-cff425783722 | claviering/code | dataStructureClass/chap5/t1.cpp | #include "Tree.h"
#include <iostream>
using namespace std;
void ChangeLeftRight(TreeNode* p_tree)
{
if (p_tree)
{
if (p_tree -> lson_)
ChangeLeftRight(p_tree -> lson_);
if (p_tree -> rson_)
ChangeLeftRight(p_tree -> rson_);
TreeNode *tmp_p = new TreeNode;
... | ALGO | 0.999859 | 4.202434 |
e212d066-a1ea-44a9-9b20-7dcece9e7241 | y42sora/soraSource | Algorithm/KUPC/2012/C.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <fstream>
using names... | ALGO | 0.99938 | 3.550872 |
eb863f4e-e94b-40ba-abda-7bfe96d497b9 | sifakis/CS639S20_Demos | DenseAlgebra/GEMM_Test_0_11/MatMatMultiply.cpp | #include "MatMatMultiply.h"
#include "MatMatMultiplyBlockHelper.h"
#include "mkl.h"
alignas(64) float localA[BLOCK_SIZE][BLOCK_SIZE];
alignas(64) float localB[BLOCK_SIZE][BLOCK_SIZE];
alignas(64) float localC[BLOCK_SIZE][BLOCK_SIZE];
#pragma omp threadprivate(localA, localB, localC)
void MatMatMultiply(const float (... | ALGO | 0.994919 | 5.244426 |
78bc110d-6e00-42b4-8abf-ce0cb3dad78b | ewigl/fluent_picacg | 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 |
ce2b531c-e51a-412e-90e1-c145ef24f08f | XerAlix04/BT_Algo | textfile.cpp | #include <stdio.h>
int main(){
FILE *fp;
int n, i, j;
float max, a[i];
fp = fopen("input.txt","rt");
if (fp==NULL){
perror("Xay ra loi khi mo input.txt");
return(-1);
}
fscanf(fp, "%d", &n);
for (i=1;i<=n;++i) fscanf(fp, "%f", &a[i]);
//tim max
max = a[1];
for (i=2;i<=n;++i){
if(a[i]>max) max = a[i];
... | ALGO | 0.999802 | 3.14451 |
914304b7-4a17-4e10-8a07-445929dd340c | BGCX067/facetracking-svn-to-git | branches/methods/BTrackerCore/Controller.cpp | #include "Controller.h"
#include "Config.h"
#include "OpticalFlow.h"
#include "CVOpticalFlow.h"
#include "Exception.h"
#include "PCADistance.h"
#include "PCAPose.h"
#include "PCA.h"
#include "SVM.h"
#include "CVHaarClient.h"
#include "CVVideo.h"
#include "CVHaar.h"
#ifndef __LINUX__
#include "CLWarp.h"
#endif
#include... | ALGO | 0.953551 | 4.485945 |
fb4fe430-2d5a-4775-8425-abc189dc2b19 | ishandutta2007/codeforces | xellos/normal/465/A.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int N;
cin >> N >> s;
int ans =0;
for(int i =0; i < N; i++) {
if(s[i] == '0') {ans++; break;}
ans++;}
cout << ans << "\n";
return 0;} | ALGO | 0.999776 | 3.791044 |
67b51a51-1f77-4743-b55f-7c534bc73eca | zhihuiLiang/code-test | OSQP/eigen_resize_test.cpp | #include <Eigen/SparseCore>
#include <iostream>
using namespace std;
int main(){
Eigen::SparseMatrix<int> mat;
mat.resize(1, 2);
mat.insert(0, 0) = 1;
mat.insert(0, 1) = 2;
std::cout << mat;
mat.resize(1, 2);
std::cout << mat;
mat.resize(1, 3);
mat.insert(0, 0) = 3;
mat.insert(0... | ALGO | 0.924586 | 3.059427 |
b89e2dca-7930-4814-9c69-55f3a2daf09d | CaoNguyen-1883/Leetcode-solution | 37. Sudoku Solver.cpp | #include"LeetCodeLibs.h"
class Solution {
public:
void solveSudoku(vector<vector<char>>& board) {
solve(board, 0);
}
private:
bool rows[9][9] = {false};
bool cols[9][9] = {false};
bool brd[9][9] = {false};
bool solve(vector<vector<char>>& board, int n){
if(n == 81) return true;... | ALGO | 0.999534 | 6.744415 |
55c115eb-87a0-4606-a5ba-4c90c1e3bb30 | dabaier/code | 数据处理相关文件/Dataset/train/10_ExactDivision/Exactdivision_3.cpp | #include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a;
for(b=0;a>0;a--)
{
if(a%3==0&&a%2==1)
b=b+a;
}
cout<<b;
return 0;
}
| ALGO | 0.999804 | 3.087704 |
f80c791e-8d94-4d75-a949-1c46cca89454 | vvsalash/Elliptic_Curves | B.cpp | #include <algorithm>
#include <cassert>
#include <complex>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <vector>
const int BASE = 1e9;
const int WIDTH = 9;
const long double PI = std::acos(-1.0L);
typedef std::complex<long double> complex;
class BigInt {
public:
std::v... | ALGO | 0.999692 | 4.697328 |
9133c3ae-4fcf-4dce-963a-bebd2afaba0a | fastlikearabbit/stanford-parallel-computing | biggraphs/common/graph.cpp | #include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include "graph.h"
#include "graph_internal.h"
#define GRAPH_HEADER_TOKEN ((int) 0xDEADBEEF)
void free_graph(Graph graph)
{
free(graph->outgoing_starts);
free(graph->outgoing_edges);
free(graph->incoming_starts);
... | ALGO | 0.93988 | 4.534718 |
1180e697-dfda-49c0-b767-d0a5d64c5008 | takumi152/atcoder | abc153d.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <queue>
#include <stack>
using namespace std;
typedef long long int ll;
typedef pair<int, int> Pii;
const ll mod = 1000000007;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll h;
cin >> h;
ll... | ALGO | 0.999893 | 4.403857 |
cc159898-0bae-4207-b4a9-cfb3db92459c | DingZhan/PAT-Basic-Level | 1067.cpp | #include <iostream>
#include <cstdlib>
using namespace std;
const int MAX_N = 11;
int main() {
std::string A[MAX_N], pass, str;
int i, N, n;
cin >> pass >> N;
cin.ignore();
n = 0;
while (true)
{
std::getline(cin, str);
if (str == "#")
break;
if (n >= N)
{
++n;
continue;
}
A[n] = str;
++n... | TOOL | 0.991926 | 3.478726 |
57b6d2fd-0d22-4831-a60d-18550f317515 | HSKayman/My_Improvement_Path | Project_Euler/041_Problem.cpp | #include<stdio.h>
#include<math.h>
int prime(unsigned long long x);
int hm(unsigned long long x);
int isPan(unsigned long long x);
int main(){
unsigned long long int i,max=0;
for(i=1000;i<=7654321;i++){
if(!prime(i))
continue;
if(!isPan(i))
continue;
if(max<i)
max=i;
}
printf("%llu",max);
}
int prime... | ALGO | 0.999818 | 3.975947 |
1cd6415b-f4cd-466c-b8ed-685e96a67e83 | dhirajkrdubey/ProblemSolving | 0066-plus-one/0066-plus-one.cpp | class Solution {
public:
vector<int> plusOne(vector<int>& digits) {
int n = digits.size();
for(int i=n-1; i>=0; i--){
if(digits[i] == 9) {
digits[i] = 0;
}
else if(digits[i] <9){
digits[i]++;
break;
}
... | ALGO | 0.999833 | 6.875704 |
519d448b-4da9-4750-90c6-779650ae8aca | gaurika27/Leetcode-Questions- | 1207_UniqueNumberOfOccurences.cpp | /*
Given an array of integers arr, return true if the number of occurrences of each value in the array is unique or false otherwise.
Example 1:
Input: arr = [1,2,2,1,1,3]
Output: true
Explanation: The value 1 has 3 occurrences, 2 has 2 and 3 has 1. No two values have the same number of occurrences.
Example 2:
Input:... | ALGO | 0.999766 | 6.30046 |
b7ddbb6c-3ddc-4ebd-9269-2d68932d15b9 | brokenprogrammer/programming-exercises | ProjectEuler C++/ProjectEuler003.cpp | #include <iostream>
using namespace std;
/*
* Project Euler Problem 3
* Largest prime factor
*
* The prime factors of 13195 are 5, 7, 13 and 29.
* What is the largest prime factor of the number 600851475143 ?
*
* Own Notes:
* This is the not so efficient solution to this problem. What i did
* here is a brute force... | ALGO | 0.999839 | 4.271747 |
fc9e935b-0d5b-4b63-9613-02d88b738ea9 | Armellys/cours | Tatouage/tp_sujet/ss_read.cpp | /***********************
Adèle Journée
TP de Tatouage
4A STI INSA CVL 2018
***********************/
#include "dct.h"
#include "image.h"
#include "mtrand.h"
#include <vector>
#define N 32
#define NDCT 12
//#define ALPHA 0.5
// Les coefficients DCT qui seront marqués
static unsigned int C[NDCT] = {1, 2, 3, ... | ALGO | 0.991362 | 3.774317 |
ec06b6f4-bf83-4a40-9751-9b0339372332 | rahulkumar430/C_plus_plus_programming | 7.Bit Manipulation/not_so_easy_maths.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll t;
cin >> t;
ll primes[] = {2, 3, 5, 7, 11, 13, 17, 19};
while (t--) {
ll n;
cin >> n;
ll subsets = (1 << 8) - 1;
ll ans = 0;
for (ll i = 1; i <= subsets ; i++) {
ll denom = 1ll; //1ll means 1 of type long long
ll... | ALGO | 0.99958 | 3.6111 |
29c13973-45e7-4aab-a000-cad01ff70e52 | devoted2sarcasm/blackjack | newest.cpp | int singleTurn(vector<vector<Card>>& playerHands, int& playerMoney, int& bet, vector<Card>& deck) {
int betCounts = 1;
for (int i = 0; i < playerHands.size(); i++) {
while (isPair(playerHands[i])) {
cout << "Hand " << i+1 << " has a pair of " << playerHands[i][0].rank << "s." << endl;
... | ALGO | 0.967953 | 3.968236 |
a3fd3035-6943-4c8f-9acf-55ebc8b04b19 | Okandi/neps | ex_feitos/otimizacoes/apaga_numeros.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
string resultados = "";
while (true) {
int qtdDigitos, qtdDigitosAApagar;
cin >> qtdDigitos >> qtdDigitosAApagar;
if (qtdDigitos == 0 && qtdDigitosAApagar == 0) break;
string numero;
cin >> numero;
st... | ALGO | 0.999831 | 5.50227 |
f704bde2-2e1a-4519-ae28-86c08b61f3a8 | whitel/leetcode | 17.电话号码的字母组合/main.cpp | class Solution {
public:
vector<string> letterCombinations(string digits) {
vector<string> combinations;
if (digits.empty())
return combinations;
unordered_map<char, string> phoneMap {
{'2', "abc"},
{'3', "def"},
{'4', "ghi"},
{'5'... | ALGO | 0.99995 | 7.087156 |
32cd81e0-7845-4eeb-ba2c-0eac378aa364 | billetcoin/blt | src/bip38.cpp | #include "bip38.h"
#include "base58.h"
#include "hash.h"
#include "pubkey.h"
#include "util.h"
#include "utilstrencodings.h"
#include "random.h"
#include <openssl/aes.h>
#include <secp256k1.h>
#include <string>
/** 39 bytes - 78 characters
* 1) Prefix - 2 bytes - 4 chars - strKey[0..3]
* 2) Flagbyte - 1 byte - 2 ch... | ALGO | 0.99578 | 7.318334 |
b2ee632c-299f-40b5-ab12-a23ebbb4b0e9 | hrishipawar24/Logical-Programming | 18/Assignment90.cpp | /*
Write A Program which Returns difference Even and Odd Factorial of A Given Number
Example : 5
Output : -7 (8 - 15)
*/
#include<iostream>
using namespace std;
class FactorialDifference
{
private:
const int iNo;
public:
FactorialDifference(int iValue):iNo(iValue){};
int Dif... | ALGO | 0.999954 | 5.36792 |
e79f1ced-3160-4735-b967-a722f6d789ed | KHa321Z/LeetCode-Solutions | 3600-find-the-k-th-character-in-string-game-i/find-the-k-th-character-in-string-game-i.cpp | class Solution {
public:
char kthCharacter(int k) {
string word = "a";
while (word.length() < k) {
string temp = "";
for (char ch : word)
temp += (ch + 1);
word += temp;
}
return word[k - 1];
}
}; | ALGO | 0.999781 | 5.244578 |
9586b9cd-add7-4c61-98f9-4b16853c6874 | ishandutta2007/codeforces | hank55663/normal/1375/C.cpp | #include <bits/stdc++.h>
#define mp make_pair
#define LL long long
#define pii pair<int,int>
#define x first
#define y second
#define pb push_back
#define sqr(x) ((x)*(x))
#define MEM(x) memset(x,0,sizeof(x))
#define MEMS(x) memset(x,-1,sizeof(x))
using namespace std;
int main() {
int t;
scanf("%d",&t);
int a[30000... | ALGO | 0.999661 | 3.861119 |
9f600d6f-04cf-4dca-8b72-90e6fa135a32 | Tuscoco/AEDS1 | PROGRAMAS EM C++/TESTES/mathfunctions.cpp | #include <iostream>
#include <cmath>
using namespace std;
int main()
{
double x = 3.14;
double y = 400.5;
double z,zz;
//z = max(x,y); Retorna o maior valor entre
//zz = min(x,y); Retorna o menor valor
//z = pow(x,2); Potencia
//zz = pow(y,2);
//z = sqrt(x); Raiz quadrada
//zz ... | ALGO | 0.998287 | 3.891732 |
2d793b2a-cec6-4b7b-b2f6-644e7d75d913 | samishahid516/Leveraging-Generative-AI-Tools-in-OPP-lab-5 | opp lab 5/lab task 3.cpp | #include <iostream>
#include <unordered_map>
#include <string>
using namespace std;
class Book {
private:
string title;
string author;
int publicationYear;
public:
// Constructor
Book(const string& _title, const string& _author, int _publicationYear) : title(_title), author(_author), publicationYea... | TOOL | 0.994265 | 7.297773 |
682422a2-d5d1-4d48-881c-4ca687fc403a | sjr213/fractalx12 | FractalX/FractalX/ColorUtilities.cpp | #include "stdafx.h"
#define NOMINMAX
#include <algorithm>
#include "ColorUtilities.h"
#include "ColorPin.h"
#include "ColorContrast.h"
#include "hslUtilities.h"
#include <sstream>
using namespace DxColor;
namespace fx::ColorUtilities
{
namespace
{
const bite ColorRange = 255;
const double Rounder = 0.49999;
... | TOOL | 0.872823 | 5.091728 |
105bc81f-17d5-4d4f-8f63-0633ff66d0b4 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/MixtralExpert/top0-100/maxProfitIII-Solution.maxProfit/177826_DoS_Exec_Code_Overflow.cpp | bool extractPages (const char *srcFileName, const char *destFileName) {
char pathName[1024];
GooString *gfileName = new GooString (srcFileName);
PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL);
if (!doc->isOk()) {
error(errSyntaxError, -1, "Could not extract page(s) from damaged file ('{0:s}')",... | TOOL | 0.909728 | 3.906301 |
f1cc8a0d-62a1-4bbc-90e4-12fc43765612 | KoreaFriedChips/Competitive-Programming | CCC/CCC Senior/CCC '08/ItsColdHere.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <climits>
#include <set>
#include <string>
#include <queue>
using namespace std;
#define ll long long
#define pb push_back
#define ull unsigned long long
#define pii pair<int, int>
#define mp make_pair
#define endl '\n'
vector<pair<string, int> > v;
... | ALGO | 0.998371 | 3.595748 |
c0b37722-b9a7-4396-850d-39bea510e4a2 | mclarafreitas/Linguagem-de-Programacao | Lista 6/tabuada de um numero.cpp | #include <iostream>
using namespace std;
int main(){
int numero=0;
cin >> numero;
for(int tabuada=1; tabuada<=10; tabuada++){
cout << numero << " x " << tabuada << " = "<< tabuada*numero <<endl;
}
return 0;
}
| ALGO | 0.992163 | 3.994038 |
8a8e407a-b71a-4999-8190-14aa1efe611d | C0ldSmi1e/CompetitiveProgramming | Contests/CodeforcesCodeforcesRound921Div.2/A_WeGotEverythingCovered.cpp | /**
* Author: C0ldSmi1e
* Created Time: 01/27/2024 06:50:38 AM
**/
// time-limit: 1000
// problem-url: https://codeforces.com/contest/1925/problem/A
#include <bits/stdc++.h>
using namespace std;
#ifdef DANIEL_DEBUG_TEMPLATE
#include "../debug.h"
#else
#define debug(...) 42
#endif
int main() {
cin.tie(nullptr)->... | ALGO | 0.999794 | 4.506394 |
d7e64d1f-47d7-40b0-b702-6cb55c276404 | esatsatan/BAIBU_APP | flutter_baibu/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.998471 | 6.785645 |
270692a0-38d6-4e80-8dd5-f296495425d4 | pszczesnowicz/SDC-P11-Path-Planning | src/Eigen-3.3/unsupported/doc/examples/MatrixSinh.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
int main()
{
MatrixXf A = MatrixXf::Random(3,3);
std::cout << "A = \n" << A << "\n\n";
MatrixXf sinhA = A.sinh();
std::cout << "sinh(A) = \n" << sinhA << "\n\n";
MatrixXf coshA = A.cosh();
std::cout << "cosh(A) = \n"... | ALGO | 0.975474 | 5.890235 |
11f53e5d-7c8d-4b6b-92c2-ca6796bf03e3 | 113bommy/LogicalErrorFixCodeT5 | logicalErrorFix_CodeT5_Linenumber/model/cpp/CodeT5_LineNumber_cpp_source/Problem_44_source_161.cpp | #include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chkmin(T &x, T y) {
return x > y ? x = y, 1 : 0;
}
template <typename T>
bool chkmax(T &x, T y) {
return x < y ? x = y, 1 : 0;
}
int readint() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') f = -1;
ch = getc... | ALGO | 0.999888 | 3.734349 |
5e019f8a-261e-4976-a51d-6c812afc083c | Sri-dhar/test | codes_DSA/CodeHelp-DSA-Busted-Series-main/Lecture005 Bitwise Operators, For Loops, Operator Precedence & Variable Scoping/forFib.cpp | #include<iostream>
using namespace std;
int main() {
int n = 10;
int a = 0;
int b = 1;
cout<<a <<" " <<b<<" ";
for(int i = 1; i<=n; i++ ) {
int nextNumber = a+b;
cout<<nextNumber<<" ";
a = b;
b = nextNumber;
}
return 0;
} | ALGO | 0.999875 | 3.521848 |
065c121d-5b07-456c-a742-b0224fda6681 | JamesGbl/WxCode | wxCode/components/wxtts/src/freephone/syllab.cpp | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "t2s.h"
char *tsFreePhoneImplementation::syllabify(char *string, CONFIG *config) /* replace string in situ */
{
int look = 0;
int i = 0;
int have_bd = 1; /* want nothing prior to first vowel */
char **carrier;
int marker[1024];
int c_sz;
ch... | ALGO | 0.997981 | 4.861125 |
06afa21c-1a7d-4bbf-be87-094abcb1e040 | keetonian/HashSolver | Source/src/l1_hobbes_solver.cpp | #include <cstring>
#include <cstdlib>
#include <fstream>
#include <cassert>
#include <iostream>
#include <climits>
#include <limits>
#include "l1_hobbes_solver.hpp"
#include "l1_hashtable.hpp"
extern vector<uint32_t> SeedFrequencies;
extern vector<uint32_t> SeedOffsets;
HobbesSolver::HobbesSolver() {
invertedList =... | ALGO | 0.999741 | 5.264495 |
b1659cb4-0bc7-46d1-ba30-1c2235a86627 | vatsayash/CodeForces | ED96/C.cpp | #include <bits/stdc++.h>
#include <iterator>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <math.h>
using namespace std;
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<long long>
#define vc vector<char>
#define vvc vector<vector<char> >
#define vpi vec... | ALGO | 0.999751 | 4.324789 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.