Skip to content

Commit

Permalink
🎨 style: improve format of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchuo committed Mar 12, 2019
1 parent b0be43b commit dbedba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions AdvancedLevel_C++/1018. Public Bike Management (30) .cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ int e[510][510], dis[510], weight[510];
bool visit[510];
vector<int> pre[510], path, temppath;
void dfs(int v) {
temppath.push_back(v);
if(v == 0) {
temppath.push_back(v);
int need = 0, back = 0;
for(int i = temppath.size() - 1; i >= 0; i--) {
int id = temppath[i];
Expand All @@ -36,7 +36,6 @@ void dfs(int v) {
temppath.pop_back();
return ;
}
temppath.push_back(v);
for(int i = 0; i < pre[v].size(); i++)
dfs(pre[v][i]);
temppath.pop_back();
Expand Down
7 changes: 4 additions & 3 deletions BasicLevel_C++/1046. 划拳(15).cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include <iostream>
using namespace std;
int main() {
int n, jia = 0, yi = 0,jiahan, jiahua, yihan, yihua;
int n, jia = 0, yi = 0, jiahan, jiahua, yihan, yihua, sum;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> jiahan >> jiahua >> yihan >> yihua;
if (jiahan + yihan == jiahua && yihan + jiahan != yihua)
sum = jiahan + yihan;
if (sum == jiahua && sum != yihua)
yi++;
if (jiahan + yihan != jiahua && yihan + jiahan == yihua)
if (sum != jiahua && sum == yihua)
jia++;
}
cout << jia << " " << yi;
Expand Down

0 comments on commit dbedba0

Please sign in to comment.