首页 > 其他 > 详细

Leetcode-5008 Fixed Point(不动点)

时间:2019-06-02 11:52:21      阅读:102      评论:0      收藏:0      [点我收藏+]

没啥好说的

 1 #define _for(i,a,b) for(int i = (a);i < b;i ++)
 2 class Solution
 3 {
 4     public:
 5         int fixedPoint(vector<int>& A)
 6         {
 7             _for(i,0,A.size())
 8                 if(i==A[i])
 9                     return i;
10             return -1;
11         }
12 };

 

Leetcode-5008 Fixed Point(不动点)

原文:https://www.cnblogs.com/Asurudo/p/10961894.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!